Open iOS / Android mobile view in landscape view

Hi
I am testing an iOS application which starts in Landscape mode by default.
When I try to spy the objects, The mobile view opens up in portrait mode making me impossible to capture objects.
Even if I maximise the Device view and re capture the objects, it’s still not organised.
Is there a way to open the device view in landscape by default

Thanks

1 Like

@jerin
Please let us know your Katalon Studio version and share screenshot of the device view.

@duyluong

The app launches in landscape mode.
The device is an iPad pro.
But the device view is in mobile mode and portrait. Which makes it hard to find the elements.

Katalon Studio : 7.2.1
Appium : 1.16.0
XCode : 11.3.1

Thanks

@jerin

The app actually launched in landscape but the Device View. You can horizontally resize the Device View and press Capture Object again.

Thanks

@duyluong

Though I resize the device view horizontally and recapture, the objects are still cluttered in the space of portrait view.
The rest of the space shows the app, but there are no objects there to be captured. I am capturing them only based on the object list that is shown and not able to pick from the actual view.
Even if I select the whole Application, it just shows a portrait area. Though get current orientation gives out Landscape once the app is launched.

Thanks

@jerin,

Did you try using Switch to Landscape action at the AVAILABLE ACTIONS panel?

@duyluong

I could see the switch to landscape option in Record Mobile mode but not on Spy Mobile.
Also it did not make a difference when I tapped on Switch to Landscape mode on Record Mobile mode.
The view still persists on Portrait mode.

Thanks

1 Like

I run into the same issue with landscape mobile apps. Hoping Katalon in the future adds a way to switch to landscape in Mobile Spy so we can click on the objects in Mobile Spy, and not have to traverse the tree of objects.

@duyluong is there any further development on this, along with any additions, enhancements, and fixes to mobile spy? My company is going to soon start developing mobile tests with Katalon and hoping some issues with mobile spy (and recorder are fixed). Thanks.

-Nate

@nathaniel.s.thompson

If you are still facing this issue in KS the latest version, please share the app with us. Our devs will investigate this issue on your app.

For further enhancements, we are going to:

  • Introduce new Mobile Test Object that fully supports Appium’s Selector Strategies
  • Improve our Mobile built-in keywords using recommend locators to accelerate the execution speed.
  • Enhance Mobile Spy and Mobile Recorder to generate Mobile Test Object with a recommended locator, allow to add steps during recording, and also support verifying and highlighting the inspecting elements.

Thank you for the reply @duyluong

I can’t share the application because of confidentiality/etc. But I do wonder if this is related to this uiautomator defect with landscape applications: https://stackoverflow.com/questions/50021120/ui-automator-takes-screenshots-as-portrait-not-landscape

If it can’t be fixed easily, having a switch to landscape button for mobile spy would be great (which exists in mobile recorder and fixes the issue of clicking on buttons for landscape applications).

But I’m glad you guys are going to add improvements to the mobile spy. Do you know what version this is expected in?

-Nate