Unable to handle elements in modal Dialog
I am new to selenium and facing issues while trying to handle elements in modal dialog while automating below scenario
1. Launch Paytm https://paytm.com/
2. Click on SignIn
3. Set text in mobile number and password fields with in modal dialog
I was able to run the script till step2 but seeing issues from step3 as the web elements are with in modal dialog
public final String Login_XPATH="html/body/div/div/div/form/div/button";
public final String MobileNumber_XPATH="//*[@id='mobileNumber']";
public final String PasswordPayTM_XPATH="//*[@id='password']";
WebDriver popup = driver.switchTo().window(handle);
// do something with popup
Can some one please help me on this?
I looked at the site's source.
Looks like that is an embeeded iframe in a floating div, not a window. You'll want to use the switch to frame methods instead.