No "IsPresent" method for "WebElements" or "WebElement" object #80
-
For example, I narrowed the scope to "WebElements" or "WebElement" objects with some conditions. Then I would like to use "IsPresent" method to check further if some specific element is within the above "WebElements" or "WebElement" object. However, I found there is no "IsPresent" method for "WebElements" or "WebElement" objects. Will the "IsPresent" method be added for "WebElements" or "WebElement" in the future? Or is there an alternative and elegant way to do this (just using "FindElement(s)" would cause a run-time error if does not exist... )? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
@GHRyunosuke, I think adding IsPresent method to WebElement object is a great idea - will do this on the next update (v4.1) coming this weekend! On adding it to the WebElements object - you will be able to do the following:
|
Beta Was this translation helpful? Give feedback.
-
Hi @GHRyunosuke The current way that I use for testing the equivalent of a is Anyway, I agree that a new IsPresent method for both WebElement and WebElements objects would be handier, and potentially more efficient (exiting at the first match) :) |
Beta Was this translation helpful? Give feedback.
-
@GHRyunosuke - added to latest release. Also added a test_IsPresent module for usage cases... Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Will do - thanks @GHRyunosuke! |
Beta Was this translation helpful? Give feedback.
@GHRyunosuke, I think adding IsPresent method to WebElement object is a great idea - will do this on the next update (v4.1) coming this weekend!
On adding it to the WebElements object - you will be able to do the following: