代码拉取完成,页面将自动刷新
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()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。