You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When refining target selectors on particularly complex pages, I like to stop the test at a debugging breakpoint and then experiment in the IDE REPL with different locators e.g.
However, it's easy to accidentally disable the WebDriverFacade if an incorrect selector is used, which means that even if the correct locator is used afterwards, the REPL command above continues to return an empty string. This is very confusing!
I happened to stumble across this handy command that I can also invoke in the REPL to reset the above condition:
StepEventBus.getEventBus().clearStepFailures()
But to my knowledge that isn't documented anywhere. Am I doing things terribly wrong here, and/or is there an easier way?!
The text was updated successfully, but these errors were encountered:
is a Serenity internal method, so not really the sort of thing we put in the user manual, but that would be the best way to do what you are trying to achieve.
Thanks - I guess the confusion arises where WebElementFacade is presented in the user guide as being interchangeable with a WebElement. but if a developer calls methods on one where the selector isn't present, then there are drastic side-effects! It might be worth pointing this out somewhere as users of Serenity kind of have to throw themselves fully into the Serenity API in order to use the product, so end up interacting exclusively with WebElementFacade and WebDriverFacade....
When refining target selectors on particularly complex pages, I like to stop the test at a debugging breakpoint and then experiment in the IDE REPL with different locators e.g.
Target.the("modal error validation message").locatedBy("#ibm_ccd_dialogs_MessageDialog_0").resolveFor(actor).getText()
However, it's easy to accidentally disable the WebDriverFacade if an incorrect selector is used, which means that even if the correct locator is used afterwards, the REPL command above continues to return an empty string. This is very confusing!
I happened to stumble across this handy command that I can also invoke in the REPL to reset the above condition:
But to my knowledge that isn't documented anywhere. Am I doing things terribly wrong here, and/or is there an easier way?!
The text was updated successfully, but these errors were encountered: