Set Virtual Browser Orientation Operation

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

The Set Virtual Browser Orientation operation switches the mobile browser emulator to the portrait or landscape mode.

Requirements

  • The license for TesCcomplete Web module.

  • The Web Testing and Chrome Support plugins (they are part of the Web module).

  • Google Chrome 80.

    If you have a TestComplete version earlier than 12.42, your version of the SmartBear Test Extension will be incompatible with newer versions of the Chrome web browser. To test web applications in Chrome 80, you will have to upgrade your TestComplete to some later version. We recommend using version 14.40.

    If you use a later version of Google Chrome, check whether a patch is available for it.

  • The Google mobile emulator must already be running. You can run it by using the Run Virtual Browser or Virtual Browser Loop operation.

Operation Result

The operation does not return any value.

Scripting Analogue

The operation does the same as the VirtualBrowsers.CurrentBrowser.Portrait and Landscape methods.

Child Operations

The operation cannot have child operations.

Operation Parameters

Select the desired orientation - Landscape or Portrait.

Remarks

  • The operation logs a message if it is successful and a warning if the mobile browser emulator already has the specified orientation.

  • The default orientation is determined by the Screen Width and Screen Height properties of the browser profile in Project Properties | Open Applications | Web Testing | Virtual Browsers (see Project Properties - Virtual Browsers Options).

  • To determine the current browser orientation from tests, compare the ScreenWidth and ScreenHeight properties of the VirtualBrowsers.CurrentBrowser object.

See Also

Testing Mobile Web Applications Using Emulator
Changing Mobile Browser Orientation
Run Virtual Browser Operation
Web Category

Highlight search results