Ai
1 Star 0 Fork 0

prcool/双随机系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test2.py 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
prcool 提交于 2021-01-21 22:01 +08:00 . 1.21
from module import *
from selenium import webdriver
import time
driver = get_web()
time.sleep(2)
uncheck = driver.find_elements_by_xpath('//span[@class="van-ellipsis"]')
uncheck[0].click()
input_tag = driver.find_element_by_xpath('//input[@class="van-field__control"]')
print(input_tag.get_attribute('outerHTML'))
input_tag.click()
input_tag.clear()
time.sleep(1)
print('已清空文字')
input_tag.send_keys('hello2')
time.sleep(1)
# actions = webdriver.ActionChains(driver)
# actions.move_to_element(input_tag)
# actions.send_keys_to_element(input_tag, 'python2')
# actions.perform()
time.sleep(1)
print(uncheck[1].get_attribute('outerHTML'))
uncheck[1].click()
# actions.click(uncheck).perform()
time.sleep(1)
item = driver.find_elements_by_xpath('//div[@class="van-list"]')
# actions.click(item).perform()
# item = driver.find_element_by_class_name('listDet')
print(item[1].get_attribute('outerHTML'))
item[1].click()
time.sleep(2)
check_button = driver.find_elements_by_xpath('//span[@class="van-actionsheet__name"]')
print(check_button)
print(check_button[0].get_attribute('outerHTML'))
check_button[0].click()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/prcool/double-random-system.git
git@gitee.com:prcool/double-random-system.git
prcool
double-random-system
双随机系统
master

搜索帮助