'Apple platforms with Selenium 4 on SauceLabs hangs on "Let's Browse!" page
When I launch seemingly any IOS device on SauceLabs (as defined on the platform configurator as a guide) and Selenium 4 the Safari Browser initialises to 127.0.0.1 with a message "Let's browse!"
After that it just seems to hang and then times out after 90 seconds.
See: https://app.saucelabs.com/tests/c406b979336d4a33b1015722c14759bc
After debugging I can see that despite me seeing tests in the dashboard, I am failing to create a driver object:
25: try {
26: //Console.WriteLine("About to create Driver");
27: Driver = new SauceryRemoteWebDriver(new Uri(SauceryConstants.SAUCELABS_HUB), opts);
28: } catch(Exception ex) {
29: Console.WriteLine(ex.Message);
30: }
The above code catches the exception. ex.Message is "The HTTP request to the remote WebDriver server for URL http://ondemand.saucelabs.com/wd/hub/session timed out after 60 seconds." and the stacktrace is:
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, DriverOptions options)
at Saucery.Driver.SauceryRemoteWebDriver..ctor(Uri remoteAddress, DriverOptions options) in C:\Personal\GitRepos\Saucery\Saucery\Driver\SauceryRemoteWebDriver.cs:line 9
at Saucery.Tests.SauceryBase.InitialiseDriver(DriverOptions opts, Int32 waitSecs) in C:\Personal\GitRepos\Saucery\Saucery\Tests\SauceryBase.cs:line 27
Which doesn't tell me much.
This is despite confirming that I am setting the DesiredOptions as specified in the Platform Configurator. Methinks the Platform Configurator is wrong.
What am I not seeing? Am I doing something fundamentally incorrect for IOS platforms?
My code base works perfectly well for all desktop and Android platforms. It is only Apple platforms that are hanging.
Has anyone else come across this?
Solution 1:[1]
Going to answer my own question.
The issue was a default timeout being set.
Explicitly setting the timeout to a larger number gave the Apple emulator long enough to boot up.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrew Gray |
