zoukankan      html  css  js  c++  java
  • python控制selenium点击登录按钮时报错 unknown error: Element is not clickable at point

    利用python控制selenium进行一个网页的登录时报错:

    C:UsersDesktopseleniumchrome>python chrome.py

    selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (844, 555)
      (Session info: chrome=66.0.3359.117)
      (Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 10.0.16299 x86_64)

    解决方法:

    代码由:
    submitBtn=driver.find_element_by_id("loginButton1")   //获取登录按钮 
    submitBtn.click()  //点击按钮

    改变为:

    submitBtn=driver.find_element_by_id("loginButton1")   //获取登录按钮 

    driver.execute_script("arguments[0].scrollIntoView()", submitBtn);  

    submitBtn.click()  //点击按钮

    网上查看时,有网有说可以在点击之前加sleep,本人测试之后问题没有得到解决

    参考: https://blog.csdn.net/sinat_29673403/article/details/78459648

     
     
  • 相关阅读:
    css页面自适应 媒体查询
    微信小程序rich-text中的nodes属性
    解析base64数据流---加载pdf
    用伪元素完成箭头
    搭建vue --2.x
    搭建Vue项目 vue-cli vue1.x
    Chrome----TCP
    单进程VS多进程
    线程VS进程
    Chrome---network模块---Timing
  • 原文地址:https://www.cnblogs.com/wangqianqiannb/p/8944323.html
Copyright © 2011-2022 走看看