TestProject Forum

Bug in reporting!

I have a line of code that checks if an element is not visible and it works fine!
(new WebDriverWait(driver, 15)).until(ExpectedConditions.invisibilityOfElementLocated(by));

But in report this step always comes as Fail
no such element: Unable to locate element: {“method”:“xpath”,“selector”:"//h2[. = ‘Inleverans’]"}

‘Unable to locate element’ is the expected behavior here!
This I believe is a bug in the reporting system!
Please report it or let know how to deal with it.


For someone who has the problem as me.

I found a workaround that stops adding all actions done by the ‘driver’!

In test case, only add those steps to the report that you want to by

1 Like

I have the same issue using Find Elements (which should not raise exception but returns an empty list) in dotnet.

I hope there will be an option, at least for Find Elements, to be able to validate a control is not present.


I’ve created a bug for this behaviour: #16081
We will let you know when the issue will be fixed.

Both the plain plain Find Elements and its fluent wait version in SDK 1.2.1 are reported correctly.
What is the SDK version you are using?

I am using Open SDK 1.2.1.

But, I just updated the agent (v3.0.5), and the error is no more visible in the report now. So the problem is fixed for me!

For more information, the FindElements did not raise exception (the test passed as expected), but the report previously logged errors when the FindElements returned an empty list. I have no try-catch in my tests, so the test would have failed in case of exception.

Thanks. Glad it works now.