Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
How to rotate Mobile device while testing using JAVA to landscape and portrait . I tried to use DesiredCapabilities but it didn't worked

Map<String, Object> mobileEmulator = new HashMap<String, Object>();

            mobileEmulator.put("deviceName", deviceName);

            WebDriverManager.chromedriver().setup();

            ChromeOptions chromeOption = new ChromeOptions();
            chromeOption.setPageLoadStrategy(PageLoadStrategy.NONE);
            chromeOption.setExperimentalOption("mobileEmulation", mobileEmulator);

            DesiredCapabilities caps = new DesiredCapabilities();
            caps.setCapability("rotatable", true);
            caps.setCapability("deviceOrientation", orientationMode);
            caps.setCapability(ChromeOptions.CAPABILITY, chromeOption);

            chromeOption.merge(caps);

            driver = new ChromeDriver(chromeOption);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!