M
M
Mykyta_M2018-02-06 23:20:19
Python
Mykyta_M, 2018-02-06 23:20:19

How to make a script (Python Selenium) compatible with Firefox 58?

Hello! Faced a problem! There is a script for automation in Python + Selenium. Works fine on FF 46(ubuntu 14.04, Python 2) and 55(Windows 10, Python 3) versions, but has issues on 58.x versions (Ubuntu 16.04, Ubuntu 14.04 | Python 2).
For this piece of code:

h1_text = "lorem ipsum"
heading = driver.find_element_by_css_selector("div[class='s-item-title']")
heading.click()
heading.send_keys(Keys.CONTROL,"a")
heading.send_keys(Keys.DELETE)
heading.send_keys(h1_text)

gives an error
"selenium.common.exceptions.ElementNotInteractableException: Message: Element is not reachable by keyboard"
But it works with the first two configurations.
What could be the reason and what can be done about it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeniy _, 2018-02-07
@GeneD88

And what is your task? Send text "lorem ipsum" to field "div[class='s-item-title']"?
Is it important to check the functionality of the keys pressed?
If not, then try:
ps: or getElementsByClassName

M
mipan, 2018-02-06
@mipan

webdriver is not fresh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question