I'm trying to write a script to test an option of a website, this option enables users to edit their own message and so it's represented by a pencil icon which has the xpath:
"//*@id='content']/div[2]/div/div[2]/div/div[2]/div[1]/div/div[26]/div[3]/div[1]/span[1]/button[1]
The problem is that icon appears only if users hover their own message with their mouse. So for Selenium it's not a visible element and I have an Exception.
I have another exception now, and I think it's linked to the hov.perform()
This is the message:
Traceback (most recent call last):
File "private_discussion_script.py", line 50, in test_script_shift
hov = ActionChains(driver).move_to_element(element).perform()
File "C:\PYTHON27\lib\site-packages\selenium-3.0.0b3-py2.7.egg\selenium\webdriver\common\action_chains.py", line 74, in perform
action()
File "C:\PYTHON27\lib\site-packages\selenium-3.0.0b3-py2.7.egg\selenium\webdriver\common\action_chains.py", line 225, in <lambda>
Command.MOVE_TO, {'element': to_element.id}))
File "C:\PYTHON27\lib\site-packages\selenium-3.0.0b3-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "C:\PYTHON27\lib\site-packages\selenium-3.0.0b3-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: POST /session/80574c31-b05c-4bb7-8cb2-053ebe4eeae5/moveto did not match a known command`