zoukankan      html  css  js  c++  java
  • selenium+python 移动鼠标方法

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    import time
    driver=webdriver.Chrome()
    driver.get('http://www.baidu.com')
    driver.find_element_by_id('lb').click()
    #driver.find_element_by_id('TANGRAM__PSP_10__unameLoginLink').click()
    time.sleep(3)
    driver.find_element_by_name('userName').send_keys('id')
    driver.find_element_by_name('password').send_keys('passwd')
    driver.find_element_by_id('TANGRAM__PSP_10__submit').click()
    driver.find_element_by_css_selector('.user-name-top')
    webdriver.ActionChains(driver).move_to_element(user).perform() #移动鼠标到我的用户名
    driver.find_element_by_css_selector('a.sep').click()
    
  • 相关阅读:
    每日总结50
    每日总结49
    每日总结48
    每日总结47
    每日总结46
    每日总结45
    每日总结44
    每日总结42
    每日总结41
    每日总结39
  • 原文地址:https://www.cnblogs.com/paisen/p/3310067.html
Copyright © 2011-2022 走看看