How to handle Login authentication pop-up using selenium on chrome browser - selenium

The pop-up which is highlighted in the image is getting handled on firefox and IE browser as the text of the pop-up gets changed (i.e. it becomes to "Authentication required") but on chrome, it is seen as it is there in the image.
For solving this, i have already used Robot class and AutoIt script, but it is not working.
Is there any other enter image description hereway to solve this problem?

Related

Get past Google login using Selenium chrome driver

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).

How do I bypass the login page when I am testing Salesforce Lightning using Selenium Webdriver?

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?

Can't enter username into popup authentification window Java, selenium (in Safari and Opera)

Can't enter username into popup authentication window Java, selenium (in Safari and Opera)
This constriction doesn't work both in Safari and Opera:
driver.get(“https://username:password#example.com”)
And this doesn't work too:
Alert alert = driver.switchTo().alert();
alert.sendKeys("Test"); //that is how I am trying to enter login
Thank you in advance!

Can't login to gmail via Selenium Webdriver, asks for recovery email?

I am using Selenium Webdriver version 3.4 and chromedriver 2.35.528157. My test consists of entering a system through google, so when I click login through google it asks me to enter my email. When I enter my email and click next it asks for the screenshot attached, it does not get to enter password screen. I tried adding a recovery mail but if I follow the steps it just sends a verification code to the recovery email and complicates things all over. The weird part is if I do this manually in an incognito browser, Firefox driver or in headless mode on chrome everything works fine.
from selenium.webdriver.common.keys import Keys
variableForTextFieldId.send_keys(Keys.ENTER)
I was having the same issue as you when using either .click() or .submit(). However, I ended up using the Keys variable ENTER and it allowed me to get to the next part of login (The password screen).
You must be using the class for the xpath, which is same for 'Next' and 'Forgot email' links. Therefore it clicks Forgot Email and lands on the Email Recovery page.
There are 3 classes in the Next button itself. Try using the id of the first one.
Command:
driver.findElement(By.id("identifierNext")).click();
This will lead you to the Password page. Let me know it helped.

How to click browser refresh confirmation pop up when testing with selenium ide

I have an issue when trying to test a web application with Selenium IDE when i refresh the web page a browser confirmation message is pop upped, is there any option in selenium IDE to automatically click ok to this browser confirmation message
please help me out..
Dismissing alert/prompt/confirmation dialogs launched from an onload event is a long-standing issue with Selenium, and nobody has been able to find a way to do it. Selenium handles these dialogs at all other times just fine, but during page load it does not.
Have u used assertConfirmation ? If not try it. I have used it to handle such confirmations.