1

We are building automations using ahk with Selenium in Chrome, where we in the process flow, need to ctrl+click on a link. On one computer a Selenium method works fine with no errors, specifically "Selenium.Keys.Control". But on my computer it can't find the element, and depending on the method used, I get elementNotVisibleError or a error message saying that, "I can't interact with the element". It clicks on the element above it, the parent element, but it just won't click on the right button, even though the XPaths used works fine.

my question is why is the method working on my colleagues browser, even though we have the same version of chrome?

2 Answers2

0

Question might be already answered here:

Element not visible error (not able to click an element)

However, this may be caused by screen dimensions and resolutions different in both computers.

If you know that the element exists you could try scrolling to it (if is that the case, like the problem I faced once):

elm = browser.find_elements_by_xpath('//*[contains(text(), "%s")]' % track)

if not elm.is_displayed():
      browser.execute_script("arguments[0].scrollIntoView();", elm)

(... do what you need to do after having the element in your screen ... )

Piero Costa
  • 180
  • 11
0

I stumbled upon the answer, and it is quite embarrassing. At some point (maybe some weeks ago) I have accidentally changed my Chrome zoom level to 110%. That resulted in the html elements, that overlaid each other to interfere with Selenium.keys.control.click

so now I have changed the zoom level to 80%, the interference of the outer element has been stopped.

But in the end it is the robustness of the website that is at fault.

Thanks to all the people taking the time to think about my problem.