Reputation: 212
Scenario- https://www.cleartrip.com/ site. Click on Your Trips and then click on Sign In option. A pop up appears for sign In details. Need to click on sign In button. I tried everything- normal click, window handle, alert and frames. Not able to click on it. Can some one help me here?
Upvotes: 0
Views: 853
Reputation: 91
When you got the pop up showing, you will want to switch to the pop up iFrame:
In python:
driver.switch_to.frame("modal_window")
In Java:
driver.switchTo().frame("modal_window")
Where "modal_window" is the id of the iFrame you want to switch on to.
Then you can do your submit button click function:
driver.find_element_by_css("signInButton").click()
Upvotes: 1