Reputation: 815
I'm running into issues where Jenkins will not launch safari with the installed extensions. When i take the same bash script and execute it via terminal (outside of jenkins) the script runs as expect.
The extension having issues is the Selenium Web Driver Safari Extension. When Safari loads i'm presented with prompt that the Extension has been migrated. All automated UI tests then fail of course.
I've google searched for my answer and browse stackoverlfow, but i can't figure it out.
the webdriver is instantiated with safari_opts.skip_extension_installation = true
I'm struggling to figure out the problem. Any help is most appreciated.
Thanks!
Brian
Upvotes: 2
Views: 500
Reputation: 745
yup, stanjer is right... i just add this answer to improve it.
go detail of this issue specially comment no " 71" .
https://code.google.com/p/selenium/issues/detail?id=7933
I use this code at the beginning of my shell script like below:
keychain="~/Library/Keychains/login.keychain"
security -v unlock-keychain -p ewew1221 ~/Library/Keychains/login.keychain
if [ $? -ne 0 ];then
echo "Cannot open keychain ${keychain}"
exit 1
fi
ewew1221 is my password
Upvotes: 0
Reputation: 3461
As Jenkins is running a job in a clean environment, even if you have already added a keychain, it will ignore it. So, you should add a keychain as a build step. Something like:
security -v unlock-keychain -p <pass> ~/login.keychain
Upvotes: 2