Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a50324

Browse files
alvinthaibaijum
authored andcommitted
Update page-objects.rst
changed __set__ function so that search entry is cleared prior to setting value currently, the __set__ function appends the text to the search entry, which has a default value of "Search"
1 parent 4384b03 commit 7a50324

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/page-objects.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ The ``element.py`` will look like this::
123123
driver = obj.driver
124124
WebDriverWait(driver, 100).until(
125125
lambda driver: driver.find_element_by_name(self.locator))
126+
driver.find_element_by_name(self.locator).clear()
126127
driver.find_element_by_name(self.locator).send_keys(value)
127128

128129
def __get__(self, obj, owner):

0 commit comments

Comments
 (0)