sitespeedio / browsertime

Measure and Optimize Web Performance
https://www.sitespeed.io/documentation/browsertime/
Apache License 2.0
602 stars 137 forks source link

Be able to set custom paths to Safari or Safari Technology Preview (i.e. something like safari.binaryPath) #2109

Closed 92kns closed 5 months ago

92kns commented 5 months ago

Your question

I'd like to add an implementation to be able to provide a custom path to Safari or STP (or even a Webkit build one day).

I was wondering what the best way to do this is?

It seems like things are hard coded to point to /Application/<...> for Safari or Safari TP. (is this something on the Selenium side?)

unlike e.g. selenium-webdriver/edge.js and selenium-webdriver/firefox.js, it seems selenium-webdriver/safari.js has no setBinary like method.

Is an implementation like this possible on the browsertime side?

soulgalore commented 5 months ago

Hi @92kns to be able to set binary path that needs to happen in Selenium first I think. Also like Safaris WebDriver support is very limited. You can use a technology preview with --safari.useTechnologyPreview. What kind of test do you plan to run? One limitations right now is there's no easy way to setup Safari to use proxy if you want to use a replay proxy (or do you have a way, maybe it's hackable).

92kns commented 5 months ago

Thanks @soulgalore for the insight, that is unfortunate! I will look into filing a bug with Selenium to see if that is possible in the future.

What kind of test do you plan to run? One limitations right now is there's no easy way to setup Safari to use proxy if you want to use a replay proxy (or do you have a way, maybe it's hackable).

I am just planning to run a custom benchmark test served on a local httpserver, (so no dealing with the proxy playback issues)

soulgalore commented 5 months ago

I see. I think the problem is Safaridriver, that it not has any (exposed) way of setting binaries? Running safaridriver --help doesn't give you so much information.

92kns commented 5 months ago

Ah yes that makes sense. I had filed this https://github.com/SeleniumHQ/selenium/issues/13714 before checking your comment, which is inline with what you said. In that case I don't think there is much that can be done... I will look at alternative solutions. Feel free to close this issue!