0

I've been trying to upload files to the mobile simulator that BrowserStack provides. However, I'm learning that anytime I get an error, the platform is set to Mac OSX, not Windows (where I upload the files). How do I change the platform specified by the Driver info?

Note: I'm writing tests in Python using Selenium

Here's what the error looks like:

unknown error: Element is not clickable at point (108, 458) (Session info: webview=37.0.0.0) (Driver info: chromedriver=2.18.343837 (sessionidhere),platform=Mac OS X 10.10.5 x86_64)

note: sessionidhere is not what it literally stated

rene
  • 41,474
  • 78
  • 114
  • 152
as1216
  • 1,194
  • 2
  • 8
  • 11

1 Answers1

0
import selenium.webdriver as webdriver

desired_cap = {'os': 'Windows', 'os_version': 'xp', 'browser': 'IE', 'browser_version': '7.0'}
driver = webdriver.Remote(
    command_executor='http://logindetailshere@hub.browserstack.com:80/wd/hub',
    desired_capabilities=desired_cap)

On error, by clicking a nonexistent element in this case, these details are shown:

Capabilities [{browserAttachTimeout=0, enablePersistentHover=false, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=7, platform=WINDOWS, nativeEvents=false, ie.ensureCleanSession=true, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=about:blank, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]

Cees Timmerman
  • 17,623
  • 11
  • 91
  • 124