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?
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?
i have a registration page in which there is a OTP field. How to ask selenium to wait until otp get entered into that field before click on registration button.
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.
I have two we browsers in my form.
first form navigates to a website at load event.
now whenever user clicks any link after load of initial webpage, i want that link to be opened in another web browser control.
how can i do this??