Python3.6+selenium2.53.6自动化测试_is_enabled

 

环境:

Python3.6+selenium2.53.6自动化测试_is_enabled_第1张图片

编辑工具:

浏览器:

Python3.6+selenium2.53.6自动化测试_is_enabled_第2张图片

 

有问题可以联系qq:1776376537

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# coding:utf-8
#导入包
from common.base import Base
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.select import Select
#打开浏览器
driver = webdriver.Firefox()
#打开本地html
driver.get("file:///D:/BaiduNetdiskDownload/web%E8%87%AA%E5%8A%A8%E5%8C%96selenium+python/%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8C%85/checkbox.html")
check = Base(driver)
#全部选中
loc_all = ("xpath",'.//*[@type="checkbox"]')
enabled
 all = check.findElements(loc_all)
 print(all)#list对象
 for i in all:
     print(i.is_enabled())

你可能感兴趣的:(自动化总结三)