SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

Incorporate the expected conditions of Selenium

Open emanlove opened this issue 2 years ago • 4 comments

There is now a a variety of conditions that Selenium can either wait for, get, or check against. The idea is that we can create a small set of generic keywords, maybe

Wait Until Element State Is (Not) Get Element State Element States Should (Not) Be

which allows for one to wait for, get, or check against the element state. There is also capability to create a custom condition within selenium that could be incorporated into the library and these keywords. As for names maybe condition or expected condition might be better as not all object to be checked I suspect would be an element.

Although not part of this issue, it may be worth starting to have a conversation around whether or not these keywords might allow for reducing the number of library keywords and deprecating the "Wait For ..." keywords.

Related Issues:

Add new selenium 4 timeout getters #1825 Add keywords for dealing with stale elements #1767 Add "Wait for DOM inactivity" keyword which waits until page is fully loaded/rendered #1764 New Keyword 'Element Attriubte Should Contain' #1129 New Keyword 'Wait Until Element Contains attribute' #1126 How we can deal with stale element reference with selenium libray?We need a keyword to deal with stale element reference #1792 Add "Wait for DOM inactivity" keyword which waits until page is fully loaded/rendered #1764 Wait For Condition and Title Should Be seem to be out of sync #1728 Provide support for waiting for a value in a textarea element #1726 Add parameter to make Wait Until Page Contains case insensitive #1517 Wait until does not contain element always waits for full amount of wait time #1364

References:

selenium.webdriver.support.expected_conditions within API Example implementation

emanlove avatar May 18 '23 00:05 emanlove