I have a popup window which does not exist in the WebDriver.
There is no WindowHandle for it, so I cannot address it as Alert.
But since the cursor is in the right position, is there any way to just send username TAB password ENTER as Keys?
CodePudding user response:
Try to use the approach where you send username and password in URL Request:
http://username:[email protected]
The username is username
and password is password
and the rest is the URL of that web page
String URL = "http://" username ":" password "@" theWebPageUrl;
driver.get(URL);
The more detailed answer is here
CodePudding user response:
to me, that looks like a prompt alert, therefore I'd try something like this in order to interact with it:
driver.switchTo().alert()
usually, I'd then use
sendKeys(String text)
method, but you have 2 textfields there, so I'm not 100% sure how it will handle them