Vrtgs / thirtyfour

Selenium WebDriver client for Rust, for automated testing of websites
Other
1.06k stars 78 forks source link

Resolve webdriver api paths relative to server_url #240

Open grelner opened 1 month ago

grelner commented 1 month ago

Sorry for the delay, but here is a fix for #229. Thirtyfour uses Url::join to resolve url's with an argument that starts with '/'. Given webdriver url "http://localhost:4444/wd/hub" and "/session", Url::join will return http://localhost:4444/session, thus making is incompatible with systems such as selenoid, and selenium versions < 4 which use /wd/hub as a base path. This PR simply removes the leading slash from the selenium api paths and this makes Url::join resolve the paths as expected.

Vrtgs commented 3 weeks ago

hey I hope you aren't busy but I'm just checking to make sure you see this, so could you implement the changes or should I pull them in then change them my self?

grelner commented 1 week ago

Hi sorry this fell between the cracks. I've reverted the AsRef commit, as it's not relevant to this PR