FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
85 stars 47 forks source link

Target minified Selenium download link using LXML, not regex #127

Closed jethac closed 8 years ago

jethac commented 8 years ago

It appears that a while back, the maintainers of Selenium shifted to using a Google minified link instead of a direct link to the Selenium server JAR file. This broke mdk behat, which was using a regex based on the JAR file's name.

This pull request represents the use of LXML and XPath to find the correct link. Unfortunately as the source page being scraped is not particularly semantic I don't think there's a better way of doing this at present.

FMCorz commented 8 years ago

Thanks Jetha, nice idea!

I was actually contemplating the idea of stealing Protractor's webdriver-manager logic: https://github.com/angular/protractor/blob/master/bin/webdriver-manager

Or parsing: https://selenium-release.storage.googleapis.com/

What do you think?

jethac commented 8 years ago

Hmm, parsing the latter sounds like it could be good! Let me take a look :)

jethac commented 8 years ago

See https://github.com/FMCorz/mdk/pull/128.