36
36
37
37
def is_element_present (driver , selector , by = By .CSS_SELECTOR ):
38
38
"""
39
- Searches for the specified element by the given selector. Returns whether
40
- the element object if the element is present on the page.
39
+ Returns whether the specified element selector is present on the page.
41
40
@Params
42
41
driver - the webdriver object (required)
43
42
selector - the locator that is used (required)
@@ -54,8 +53,7 @@ def is_element_present(driver, selector, by=By.CSS_SELECTOR):
54
53
55
54
def is_element_visible (driver , selector , by = By .CSS_SELECTOR ):
56
55
"""
57
- Searches for the specified element by the given selector. Returns whether
58
- the element object if the element is present and visible on the page.
56
+ Returns whether the specified element selector is visible on the page.
59
57
@Params
60
58
driver - the webdriver object (required)
61
59
selector - the locator that is used (required)
@@ -72,9 +70,7 @@ def is_element_visible(driver, selector, by=By.CSS_SELECTOR):
72
70
73
71
def is_text_visible (driver , text , selector , by = By .CSS_SELECTOR ):
74
72
"""
75
- Searches for the specified element by the given selector. Returns whether
76
- the element object if the element is present and visible on the page and
77
- contains the given text.
73
+ Returns whether the specified text is visible in the specified selector.
78
74
@Params
79
75
driver - the webdriver object (required)
80
76
text - the text string to search for
0 commit comments