Skip to content

Fixing issue #5277 remote webdriver doesn't throw an exception correctly if using compound class name#52

Closed
alex-savchuk wants to merge 1 commit intoSeleniumHQ:masterfrom
alex-savchuk:upstream5
Closed

Fixing issue #5277 remote webdriver doesn't throw an exception correctly if using compound class name#52
alex-savchuk wants to merge 1 commit intoSeleniumHQ:masterfrom
alex-savchuk:upstream5

Conversation

@alex-savchuk
Copy link
Copy Markdown
Contributor

Fixing issue #5277 remote webdriver doesn't throw an exception if finding by compound class name

Source of issue is that during remote work json parameter generation was out of try&catch block
so if something like exception for invalid class name locator is thrown
it was not catched and incorrectly returned to client.

2 tests are added.

…ding by compound class name

Fixing issue #5277 remote webdriver doesn't throw an exception if
finding by compound class name.
@alex-savchuk
Copy link
Copy Markdown
Contributor Author

Thanks for comment.
That's really strange. I'll recheck it.
Is this test ran for remote case?

@barancev
Copy link
Copy Markdown
Member

On CI we run all the tests remotely in SauceLabs cloud.

@alex-savchuk
Copy link
Copy Markdown
Contributor Author

ok, understand the reason of this strange passed test.

java test fails immediately at constructing of request to hub so really hub doesn't receive command with such compound class and doesn't try to execute it. in both cases instanciation of java client is failed with the same exeception so if it catched as in specified test all looks worked.

in python case failure happens at node java client, and due it's uncatched it leads to WebDriverException with empty message at python code.

solution from commit fixes it but some similar behaviour may exist at another points.

I'm not sure how it should be tested correctly.

@alex-savchuk
Copy link
Copy Markdown
Contributor Author

Closed. Proper solution is required, e.g. removing checks at client bindings and server
and checks that this error is correctly handled by browser drivers.

yiming-tang-cs pushed a commit to ponder-lab/selenium that referenced this pull request Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants