Selenium3.0 文档——selenium.webdriver.support.expected_conditions

class selenium.webdriver.support.expected_conditions.alert_is_present

alert是否出现。

class selenium.webdriver.support.expected_conditions.element_located_selection_state_to_be(locator, is_selected)

定位一个元素检查的它的状态是否和期待的一样。locator是定位器,是(by,path)的元组,is_selected是布尔值。

class selenium.webdriver.support.expected_conditions.element_located_to_be_selected(locator)
定位的元素是否被选择。

class selenium.webdriver.support.expected_conditions.element_selection_state_to_be(element, is_selected)

定位一个元素检查的它的状态是否和期待的一样。element是网页元素,is_selected是布尔值。

class selenium.webdriver.support.expected_conditions.element_to_be_clickable(locator)

元素是否是可见的或者是否是有效的,比如可以点击。locator是定位器。

class selenium.webdriver.support.expected_conditions.element_to_be_selected(element)

检查元素是否是被选中的。element是网页元素。

class selenium.webdriver.support.expected_conditions.frame_to_be_available_and_switch_to_it(locator)

判断该frame是否可以switch进去,如果可以的话,返回True并且switch进去,否则返回False。locator是定位器。

class selenium.webdriver.support.expected_conditions.invisibility_of_element_located(locator)

检查一个元素是否不可见或者在DOM中没出现。locator是定位器。

class selenium.webdriver.support.expected_conditions.new_window_is_opened(current_handles)

新的窗口是否打开,current_handles是当前窗口的句柄。

class selenium.webdriver.support.expected_conditions.number_of_windows_to_be(num_windows)

打开的窗口是否满足期待。

class selenium.webdriver.support.expected_conditions.presence_of_all_elements_located(locator)

判断网页上是否存在至少一个定位的元素。locator是定位器。

class selenium.webdriver.support.expected_conditions.presence_of_element_located(locator)

判断元素是否存在DOM中,并不代表一定可见。locator是定位器。

class selenium.webdriver.support.expected_conditions.staleness_of(element)

等待元素不再依附于DOM,即从DOM中删除。如果在DOM中返回False,否则返回True。element是网页元素。

class selenium.webdriver.support.expected_conditions.text_to_be_present_in_element(locator, text_)

检查元素中的文本内容是否存在指定的内容。locator是定位器。

class selenium.webdriver.support.expected_conditions.text_to_be_present_in_element_value(locator, text_)

检查元素的value值中是否存在指定的内容。locator是定位器。

class selenium.webdriver.support.expected_conditions.title_contains(title)

判断当前页面的title是否包含预期字符串。是就返回True,否则False。

class selenium.webdriver.support.expected_conditions.title_is(title)

判断当前页面的title是否精确等于预期。是就返回True,否则False。

class selenium.webdriver.support.expected_conditions.visibility_of(element)

检查元素是否在DOM中可见,可见的意思是不仅是显示出来了,而且还有大于0的宽和高。element是网页元素。

class selenium.webdriver.support.expected_conditions.visibility_of_any_elements_located(locator)

检查网页上至少存在一个可见的指定元素。locator是定位器。

class selenium.webdriver.support.expected_conditions.visibility_of_element_located(locator)

检查元素是否在DOM中可见,可见的意思是不仅是显示出来了,而且还有大于0的宽和高。locator是定位器。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值