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

来源:互联网 发布:sql沉思录 编辑:程序博客网 时间:2024/06/06 00:12
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 0
原创粉丝点击