The new architecture works with any Android device that supports the UIAutomator2 (v1.25.0) automation framework.
The new architecture requires:
Web and Hybrid: Android 5 and above with Chrome 66.0.3359.0 and above.
matches()
function is not supported.Appium client 6.1.0 or above. For more information and for a set of best practices on how to adjust your Appium Java code to work with this new version of the Appium client, see Upgrading to Appium Client 6.1.0.
During the transition phase, you need to select the new architecture on a per-script basis using the following designated new capabilities. These capabilities control the architecture used for either native only, native + web, native + hybrid, or native + web + hybrid.
To use the new architecture on all your scripts, you can ask Perfecto Support to update your cloud configuration to use the new architecture by default. If the new architecture is the default, you can omit these capabilities.
capabilities.setCapability("enableAppiumBehavior", true); |
capabilities.setCapability("enableAppiumBehavior", true); capabilities.setCapability("useAppiumForWeb", true); capabilities.setCapability("browserName", "Chrome"); |
capabilities.setCapability("enableAppiumBehavior", true); capabilities.setCapability("useAppiumForHybrid", true); |
When working with a Quantum project, add the following capabilities.
<parameter name="perfecto.capabilities.enableAppiumBehavior" value="true" /> |
<parameter name="perfecto.capabilities.enableAppiumBehavior" value="true" /> <parameter name="perfecto.capabilities.useAppiumForWeb" value="true" /> <parameter name="perfecto.capabilities.browserName" value="Chrome" /> |
<parameter name="perfecto.capabilities.enableAppiumBehavior" value="true"></parameter> <parameter name="perfecto.capabilities.useAppiumForHybrid" value="true" /> |
Alternatively, use the following syntax.
<parameter name="perfecto.additional.capabilities" value="{'enableAppiumBehavior':true, 'useAppiumForWeb':true, 'useAppiumForHybrid':true}" /> |
setWebContentsDebuggingEnabled
property to true
when creating the webview object. For details, see Android remote debugging.Change the value of the automationName
capability from PerfectoMobile
to its default value, Appium
. Alternatively, because Appium
is the default value, you may remove this capability altogether.
Cancel the instrumentation (there is no need to instrument the tested app). Then fix object locators, if needed, because the tree seen by the script is slightly different.
Add the following capabilities with a value of true
(as described above):
useAppiumForHybrid
enableAppiumBehavior
Review and adjust the switch-to-webview logic in your code: The driver can now return the list with several webview contexts, and the best practice is switching to the last context in this list (provided that the tested webview is currently in the front).