Selenium + Safari - Webkit 300 Error

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)

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

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.

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.