Selenium + Safari - Webkit 300 error

On my project I'm trying to enable automation tests using Selenium (3.4.0, also tried lower versions) on Mac with Safari. As Apple forums say, I'm using Technology preview for tests.

Safari starts okay, but all sites are failing with following error:

Safari can't open page. The error is "Webkit encountered an internal error" (WebkitErrorDomain:300)

Error example

But in not-automation session everything opens correctly.

Here is how browser driver is initialized:

SafariOptions safariOptions = new SafariOptions(); safariOptions.setUseTechnologyPreview(true); safariOptions.setUseCleanSession(true); caps.setCapability(SafariOptions.CAPABILITY, safariOptions); driver = new SafariDriver(caps); 

Do you have any thoughts? Thanks in advance

4

1 Answer

Seems like Safari does not support explicit waits anymore with 3.4.0 and safari 11. I faced the same issue and when i removed the explicit waits and used Thread.sleep() it seems to work fine. Although this not what i wanted but 300 error was gone.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like