Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"POST /execute" breaks on updated drivers when using Leadfoot directly. #143

Closed
cuff-links opened this issue May 14, 2018 · 5 comments
Closed
Assignees

Comments

@cuff-links
Copy link
Contributor

cuff-links commented May 14, 2018

When using Leadfoot by itself, GeckoDriver > 16.0 breaks when using the "POST /execute" function.

The webdriver spec has updated this to be "POST /execute/sync" and GeckoDriver updated that a few versions ago. I wanted to get your thoughts on how to handle and I will post a fix.

Should we:
1.) Create a conditional to check the version of the driver edit the endpoint so as not to break drivers that haven't updated their spec yet (i.e. Chromedriver).
2.) Something else I haven't thought of.

@cuff-links
Copy link
Contributor Author

When using "POST /execute", the command fails with a "Command not found error." I monkey-patched my local fork just to check if the "POST /execute/sync" endpoint works, and it does.

My environment: Mac OSX
Geckodriver: 20.0
Firefox: 59
LeadFoot: 1.7.5

@jason0x43
Copy link
Member

There's not a way (that I'm aware of) to query the webdriver about its own version, so we'll probably need to handle it via a custom feature and a fallback behavior in the execute function, something like Session.closeCurrentWindow.

Basically, if leadfoot tries to call /execute and gets back an UnknownCommand message, it should assume the driver is using newer semantics, set a useWebDriverExecute flag (so we'll know not to use the wrong command again), and call /execute/sync instead.

@cuff-links
Copy link
Contributor Author

Sounds good. I will get on it.

@cuff-links
Copy link
Contributor Author

Can you assign to me? Or is that not possible?

@cuff-links
Copy link
Contributor Author

This has been fixed via the referenced PRs/

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants