美文网首页
29. 常见元素定位 - 日期选择器

29. 常见元素定位 - 日期选择器

作者: 薛东弗斯 | 来源:发表于2024-03-12 06:22 被阅读0次

    时间选择器 - View Design (iviewui.com)

    image.png
    import time
    from selenium import webdriver
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support.select import Select
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.get('https://iviewui.com/view-ui-plus/component/form/time-picker')
    driver.find_element(By.XPATH,'//input[@class="ivu-input ivu-input-default ivu-input-with-suffix"]').send_keys("2023-07-18")
    time.sleep(10)
    driver.close()
    
    image.png
    import time
    from selenium import webdriver
    from selenium.webdriver.common.by import By
    from selenium.webdriver.support.select import Select
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.get('https://iviewui.com/view-ui-plus/component/form/time-picker')
    driver.find_element(By.XPATH,'//input[@class="ivu-input ivu-input-default ivu-input-with-suffix"]').send_keys("2023-07-18")
    time.sleep(3)
    driver.find_elements(By.XPATH,'//input[@class="ivu-input ivu-input-default ivu-input-with-suffix"]')[1].send_keys("2023-07-18 - 2023-8-17")
    time.sleep(10)
    driver.close()
    

    相关文章

      网友评论

          本文标题:29. 常见元素定位 - 日期选择器

          本文链接:https://www.haomeiwen.com/subject/iuayzdtx.html