I am using Selenium in Python to navigate to a website and fill in a form. There is a section of the code that let's you click on a button to open a pop-up node tree using javascript. I am able to click the button using the following code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Ie("C:\\IEDriverServer.exe")
driver.get('htto://someurl.com')
popup = driver.find_element_by_xpath('//a[@onclick and @href = "javascript:;" and img/@alt = "Node Tree"]')
popup.click()
driver.switch_to.alert
At this point, everything on website becomes unclickable both in the pop-up box and on the actual site. What is causing this? Unfortunately I can't share the Javascript as it's internal to my company.
driver.switch_to.alert
? – alecxe Jul 29 '14 at 19:19