0

i need do a click in point x=466 and y=590

when i try:

driver.execute_script("window.scrollTo(466, 590)").click()

i get a error on click() method

i'd like to know how can i do a click with scroll to this point

romo
  • 33
  • 5
  • What is the URL where you're trying to click on a button? – adder Oct 02 '17 at 22:42
  • Cause you are doing it wrong. If I'm correct, you can't use "execute_script' to click. Why don't you scroll to that position then use "ActionChains" to move to element and click it from there. – IamBatman Oct 02 '17 at 22:51
  • 1
    https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.action_chains.html – IamBatman Oct 02 '17 at 22:53
  • the webpage is the paypal "create account" for netherland, there exists a icon Next and when I try click by name, xpath or selector i get a error "Element is not clickable at point". i think that correct point of the buttum is this x=466 and y=590 or x=589, y= 598 so id like to click there by myself to check if pass, i'm using chrome driver. – romo Oct 02 '17 at 23:36
  • You can not perform click and scroll together . You can use Action Class for this . – Ankur Singh Oct 03 '17 at 05:01
  • @romo Possible duplicate of https://stackoverflow.com/questions/16807258/selenium-click-at-certain-position – RNS Oct 03 '17 at 05:57
  • @romo It is impossible to click on a specific position in the browser via Selenium. Selenium allows us to click on an element or relative position of the element. You should post a new question along with code that causes the error when it clicks and HTML of the page. – Buaban Oct 03 '17 at 10:40

0 Answers0