I have below code -
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("url")
username = driver.find_element_by_id("LoginID")
pwd = driver.find_element_by_id("Password")
username.send_keys('usrnme')
pwd.send_keys('pswd')
Login = driver.find_element_by_id("Button2")
Login.click()
Create = driver.find_element_by_xpath("//*[@title='Create Incident']")
Create.click()
Whenever I am running this code in script or in batch I am getting below error -
Traceback (most recent call last):
File "P:\Selenium\helpline1.py", line 15, in <module>
Create.click()
File "P:\Selenium\python-3.5.1\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "P:\Selenium\python-3.5.1\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "P:\Selenium\python-3.5.1\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "P:\Selenium\python-3.5.1\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a id="anc" class="RedirectTab" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("anc", "", true, "", "", false, true))"> is not clickable at point (207.1666717529297,25) because another element <div id="overley" class="over_ley"> obscures it
Login to the site happens perfectly but after that this error in clicking an element (that is the next line of code).
Also when I am running this code line by line manually in Python IDLE or Python CLI it runs without any error. Issue just in script/batch mode in IDLE or Python CLI
Thanks to suggest.