Forum Discussion

leokleok's avatar
leokleok
Occasional Contributor
3 years ago

Running Selenium scripts on iPhone Safari

Hello,  

Could you please point me in the right direction to set up Selenium scenarios suite to run remotely on iPhone in Safari?  I would like to know if iPhone 13 is supported and if so is there a limit on the number of iPhones to run scenarios in parallel.

 

Thank you!

  • Hi leokleok!

     

    Absolutely! Under the 'Getting Started' section from the 'Automation' tab we have a capability configurator that allows you to select your desired platform/device. This will build out the required caps for the selected device. This configurator is actually a fully functioning script you can copy/paste into your IDE to get up to speed quickly with Selenium in CBT. You can access this fully by clicking on 'View Full Script' just above and to the right of the displayed capabilities.

     

    Link to our Getting Started section;

    https://app.crossbrowsertesting.com/selenium/run

     

    It looks like the iPhone 13 is not currently supported yet. You may reach out to the CBT Support Staff to inquire about any information in regards to a release timeframe.

     

    As for parallel, there is no limit to the 'types' of devices you can run at once. The only limitation is how many parallel tests you can run at maximum, which is a metric of the subscription in CBT.

     

    I hope this helps!

  • Hi leokleok!

     

    Absolutely! Under the 'Getting Started' section from the 'Automation' tab we have a capability configurator that allows you to select your desired platform/device. This will build out the required caps for the selected device. This configurator is actually a fully functioning script you can copy/paste into your IDE to get up to speed quickly with Selenium in CBT. You can access this fully by clicking on 'View Full Script' just above and to the right of the displayed capabilities.

     

    Link to our Getting Started section;

    https://app.crossbrowsertesting.com/selenium/run

     

    It looks like the iPhone 13 is not currently supported yet. You may reach out to the CBT Support Staff to inquire about any information in regards to a release timeframe.

     

    As for parallel, there is no limit to the 'types' of devices you can run at once. The only limitation is how many parallel tests you can run at maximum, which is a metric of the subscription in CBT.

     

    I hope this helps!

    • leokleok's avatar
      leokleok
      Occasional Contributor

      Hi Nick,

      Hoping I can reach out for help again. I've been experimenting with the c# selenium getting started script for iPhone 11/13.

      When the code creates a driver object successfully, the  driver.Navigate().GoToUrl("https://www.publix.com/"); call exits before the site is displayed and evaluating driver.Title results in   FORWARDING_ERROR: connect ECONNREFUSED 10.191.85.10:12993.  The CBT site ui shows the below.

       

       

      Other times, creation of Webdriver fails object with this: System.InvalidOperationException
      HResult=0x80131509
      Message=A new session could not be created. Stacktrace: FORWARDING_ERROR: connect ECONNREFUSED 10.191.85.12:13023 (SessionNotCreated)
      Source=WebDriver
      StackTrace:
      at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse)
      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 ios_testing.BasicTest.TestIos() in C:\Users\Administrator\source\repos\IOStest\UnitTest1.cs:line 44

       

      Please let me know if you can think of anything I can try

      • leokleok's avatar
        leokleok
        Occasional Contributor

        Switching to iphone12 resolved this issue; still having an issue with parallelization

    • leokleok's avatar
      leokleok
      Occasional Contributor

      Hi Nick, when running multiple tests  iphone safari is there a way to control whether CBT runs tests on multiple devices or runs several safari session on a single iphone?

       

      Thank you,

      Leo