selenium怎么用select元素

selenium怎么用select元素,第1张

List<WebElent>找 option

selector 。selectByIndex  selectByValue  SelectByText

from selenium.webdriver.common.keys import Keys

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'a')

time.sleep(2)

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'c')

time.sleep(2)

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'x')

time.sleep(2)

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'v')

time.sleep(2)

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'a')

driver.find_element_by_css_selector('#key-demo').send_keys(Keys.BACKSPACE)

time.sleep(2)


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/11987910.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存