You need to sign in to do that
Don't have an account?
Smita Lokhande
SFDC asking for 2 step verification for every login using Selenium
Hi All,
I am working on application, where after login application ask for VerificationCode which will send to registered email and after passing that verficationcode to application it is not allowing me to go to Home screen.
Note : When I am Manully Login it only asking me for first time only. but while selenium automation it is asking me for evry login step.
Kindly suggest how I can avoid this step of verifcation? is there any way to pass security Token or maybe remember/add cookies in selenium.
I am working on application, where after login application ask for VerificationCode which will send to registered email and after passing that verficationcode to application it is not allowing me to go to Home screen.
Note : When I am Manully Login it only asking me for first time only. but while selenium automation it is asking me for evry login step.
Kindly suggest how I can avoid this step of verifcation? is there any way to pass security Token or maybe remember/add cookies in selenium.
You will need to get Selenium to retrieve the cookies and save them. I would recommend persisting these to a file - then retrieving them again
so the logic would be:
- open your cookie file
- If you find it - add it to your driver (driver.manage().addCookie(cookie);)
- If you don't find it - then get it from the driver and save it to the cookie file
There is a good article on this here:- http://www.guru99.com/handling-cookies-selenium-webdriver.html
Hope this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra