java - Specifying custom screen resolution in Selenium tests -
in below blog mentioned, can modify screen resolution during selenium test runs. http://blog.testingbot.com/2013/03/15/screen-resolution-option-now-available-for-all-selenium-tests
i have tried below code(as mentioned in "https://saucelabs.com/docs/additional-config"), not setting specified resolution. still not available selenium? please me.
desiredcapabilities dc=new desiredcapabilities(); dc.setcapability("screen-resolution","1280x1024");
sauce labs != selenium
sauce labs use capability provision vm desired resolution, it's not capability selenium knows about.
selenium not capable of modifying desktop resolution!
if want modify browser size in selenium matches specific resolution can a:
driver.manage().window().setsize(new dimension(1024, 768))
the above not supported opera driver, instead need do:
desiredcapabilities capabilities = desiredcapabilities.opera() capabilities.setcapability("opera.arguments", "-screenwidth 1024 -screenheight 768")
while setting browser size not same setting screen resolution, should intents , purposes meet requirements.
Comments
Post a Comment