I need to get past a Google login form using Selenium but am unable to do so. Following advice I've seen elsewhere, I've tried making the chrome driver launch with an existing chrome profile which is already logged in to Google:
options.addArguments("user-data-dir=/Users/myuser/Library/Application Support/Google/Chrome/");
options.addArguments("profile-directory=Profile 3");
This works insofar as the correct chrome profile is opened, but as soon as selenium navigates to the desired website the Google login form pops up. If I close Selenium and open the same website with the same chrome profile in a regular browser, the browser remembers me and I am able to go straight through without being prompted to login. Am I doing something wrong or has Google fixed this workaround? (I am using Mac).
Related
I am testing Salesforce Lightning pages on Chrome using Selenium Webdriver code that's in a C# NUnit project in Visual Studio 2019. I get the Login page every time I run a test.
I used to get the Verification page after the login page but after I added the IP address of the Chrome browser to the list of trusted addresses as recommended here,
How to Automate the salesforce login OTP feature using selenium WebDriver?
the verification page is not coming up anymore.
When I test Salesforce using UFT or Selenium IDE, the login page never comes up.
As can be seen in the attached image, I even have the "Remember Me" checkbox checked.
How can I stop the login page from coming up when I am testing Salesforce Lightning using Selenium Webdriver?
Also, how can Selenium recognize Javascript popups on the page like the Allow Notifications popup in the image below?
I am trying to run some automated tests on amazon.com by using Selenium Webdriver. I tried to log in to the system but after entering the password, system either directs to “Verification needed” page and says “We will email you a code to verify your identity. This is required when something about your sign-in activity changes, like signing in from a new device or location.”
or directs to “wrong password or email” page (eventhough I try correct account information).
So my question is: How can I handle that two factor authentication in my test script?
Note: I am using ChromeDriver and Java
there are two possible approaches:
first one, you can as Kiril S mentioned, get the link from email (mailinator.com is fine inbox for such testing).
second approach is avoiding the second verification with existing browser profile. Selenium uses a temporary profile, that's probably the reason of the second verification. I'm using existing browser profile (firefox), see Selenium Chromedriver - Open Chrome Normally. For Chrome should be similar.
When the tests navigate from one page to another, selenium IE webdriver always has to re-login. Does anyone know why? It logs in the first time, but then has to re-login when it navigates to a different page. This only happens in IE and not Chrome or Firefox.
My scenario:
I am opening a https website, I get a login pop-up that is not identified by selenium webdriver. I have searched and found the below link which had similar question.
How to handle login pop up window using Selenium WebDriver?
I tried he solution given by #Pavel Janicek to pass the credentials via URL
It does not working for me, I mean after the browser is opened it keeps processing nothing happens after that.
In my case, it is a https site,i need to give username#domainname & password to login, giving only username will not work
my url looks like this
https://username#domainname:password#sitename.com
Has anyone faced this kind of problem?
Thanks
You can NOT auth with this window(in selenium without any additional framework as Robot). But you can auth without getting this window. Try change URL to: http://user:password#www.yourserveradress.com
if this will not help, you need to create separated profile in browser, pass authentication on this server and remember password and use this profile in selenium. Also I think its possible to use Windows active directory authentication, but cannot sure about details.
I have started learning selenium Webdriver API recently. I was trying to automate a simple task of launching gmail.com and logging into account using Chrome browser.
The difference I noticed is when I open browser manually it lists my accounts on the Home page and then I can select the account, enter the password and login in complete
When I launch gmail.com using selenium it directly gives me log in window when I can enter email and password
Any reason why we see the difference while launching browser through selenium