Can't locate textbox elements from login page
Image below is our example login page. I'm having issue locating the username and password elements.
This is the tag.
<input id="userId" class="Textbox required" type="text" placeholder="User Name" name="_ssoUser"/>
Below are the codes that I've tried but still no luck to solve it.
driver.findElement(By.name("_ssoUser")).sendKeys(username); driver.findElement(By.id("userId")).sendKeys(username); driver.findElement(By.xpath(".//*[@id='userId']")).sendKeys(username);
Appreciate your help. Thank you.
First wait by using implicit wait
After that see if there is a frame or not
You can handle frame by many ways. refer below:-
Note:- switch to frame first and then execute your rest of code.
Hope it will help you :)
look if you have frame if yes switch to it.
driver.switchTo().frame("<frameid> or <frame name>");