Element '[relative: {root={css selector=#login\-button\-niedobry}, filters=[{kind=above, args=[{css selector=#password\-tez\-zle}]}]}]' was not found. Check printscreen.
exception using webelements
Element '[relative: {root={css selector=#login\-button\-niedobry}, filters=[{kind=above, args=[WebElement] -> id: user-name]]}, {kind=below, args=[WebElement -> id: user-name]] -> id: user-name]]}]}]] -> id: user-name]]}]}]]}]}]' was not found. Check printscreen.
On the string extracted from the RelativeBy parameters, I used a replacement to "WebElement"
when using these particular objects.
Without this, the logs/exceptions could be very long and unreadable:
Element '[relative: {root={css selector=#login\-button\-niedobry}, filters=[{kind=above, args=[[[[[NewChromeDriver: chrome on windows (67107c5852f151f8513f43d4788840ac)] -> id: user-name]] -> id: user-name]]}, {kind=below, args=[[[[[NewChromeDriver: chrome on windows (67107c5852f151f8513f43d4788840ac)] -> relative: {root={css selector=#password}, filters=[{kind=below, args=[[[[[NewChromeDriver: chrome on windows (67107c5852f151f8513f43d4788840ac)] -> id: user-name]] -> id: user-name]]}]}]] -> id: user-name]]}]}]]}]}]' was not found. Check printscreen.
Hi, I think that this implementation might be useful.
Now logs looks like this:
and exceptions like this:
Now they can look like this:
logs using selectors
logs using webelements
exception using selectors
exception using webelements
On the string extracted from the RelativeBy parameters, I used a replacement to "WebElement" when using these particular objects. Without this, the logs/exceptions could be very long and unreadable:
And here is a demo of the regex I used: