zoukankan      html  css  js  c++  java
  • 如何定位web端页面的警告框

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    import time

    driver = webdriver.Chrome()
    driver.get('https://merch.heemoney.com/Account/Login')
    driver.find_element_by_id('txtLoginAccount').send_keys('jiatest001')
    driver.find_element_by_id('txtPassword').send_keys('123456')
    driver.find_element_by_id('txtPassword').send_keys(Keys.ENTER)
    driver.switch_to_alert().text()
    time.sleep(5)
    print(driver.switch_to_alert().text())
    time.sleep(5)



    以上代码总会返回失败,找不到警告框,求解中
  • 相关阅读:
    RSA加密系统
    安装homebrew
    go helloworld
    下载文件checksum
    6月3日
    6月1日
    5月30日
    5月28日
    5月26日
    5月24日
  • 原文地址:https://www.cnblogs.com/junzi1994/p/14304209.html
Copyright © 2011-2022 走看看