Quantum 1.21 release notes
Version 1.21 introduces the following changes (after version 1.20.1):
- Fixed the sensor authentication step in
perfectoApplicationSteps
(Github Issue - #66) -
Added a new method to control the threshold in the
DeviceUtils.isText()
method and made theDeviceUtils.isText()
&DeviceUtils.isImg()
methods public. In particular, added an overloaded method to mention the threshold for theDeviceUtils.isText()
method. This method is a visual text verification method. Also, made the followingDeviceUtils.isText()
methods andDeviceUtils.isImg()
methods public so you can use them directly if needed.CopyDeviceUtils changed methods for reference
public static String isText(String text, Integer timeout) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("content", text);
if (timeout != null) {
params.put("timeout", timeout);
}
params.put("threshold", "100");
Object result = getQAFDriver().executeScript("mobile:checkpoint:text", params);
return result.toString();
}
public static String isText(String text, Integer timeout, String threshold) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("content", text);
if (timeout != null) {
params.put("timeout", timeout);
}
params.put("threshold", threshold);
Object result = getQAFDriver().executeScript("mobile:checkpoint:text", params);
return result.toString();
}
public static String isImg(String img, Integer timeout) {
String context = getCurrentContext();
switchToContext("VISUAL");
Map<String, Object> params = new HashMap<String, Object>();
params.put("content", img);
params.put("measurement", "accurate");
params.put("source", "primary");
params.put("threshold", "90");
params.put("timeout", timeout);
params.put("match", "bounded");
params.put("imageBounds.needleBound", 25);
Object result = getQAFDriver().executeScript("mobile:checkpoint:image", params);
switchToContext(context);
return result.toString();
} -
Removed the warning logs on driver creation. The following warning logs on the driver creation were addressed and the necessary changes made to avoid this warning.
CopyDriver creation warning logs
TestNG: Driver: perfectoDriver
Feb 11, 2020 10:16:07 AM org.openqa.selenium.remote.DesiredCapabilities edge
INFO: Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
Feb 11, 2020 10:16:07 AM org.openqa.selenium.remote.DesiredCapabilities firefox
INFO: Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
Feb 11, 2020 10:16:07 AM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()` - Updated the QAF version from 2.1.14 to 2.1.15.
-
Created a switch to add capabilities for pure Appium behavior on the Perfecto server by adding a key, shown in the following code snippet, in
application.properties
.Copyapplication.properties key - pureAppiumBehavior
#To enable pure appium behaviour configure native/hybrid/web/disable value to the below key
pureAppiumBehavior=disableThe following code snippet shows potential values and their relevant code. The capabilities that are documented for the iOS and Android platforms in the links are added as shown in the following code block.
Note:The capabilities are added to the driver for each value and platform. By default, these capabilities will be ignored.
CopyEnable pure Appium behavior values
String pureAppiumBehavior = getBundle().getString("pureAppiumBehavior",
"ignore");
if (pureAppiumBehavior.equalsIgnoreCase("native")) {
if (desiredCapabilities.getPlatform().toString().equalsIgnoreCase("android")) {
((DesiredCapabilities) desiredCapabilities).setCapability("enableAppiumBehavior", true);
}
} else if (pureAppiumBehavior.equalsIgnoreCase("hybrid")) {
if (desiredCapabilities.getPlatform().toString().equalsIgnoreCase("android")) {
((DesiredCapabilities) desiredCapabilities).setCapability("enableAppiumBehavior", true);
}
((DesiredCapabilities) desiredCapabilities).setCapability("useAppiumForHybrid", true);
} else if (pureAppiumBehavior.equalsIgnoreCase("web")) {
if (desiredCapabilities.getPlatform().toString().equalsIgnoreCase("android")) {
((DesiredCapabilities) desiredCapabilities).setCapability("enableAppiumBehavior", true);
}
((DesiredCapabilities) desiredCapabilities).setCapability("useAppiumForWeb", true);
} else if (pureAppiumBehavior.equalsIgnoreCase("disable")) {
((DesiredCapabilities) desiredCapabilities).setCapability("enableAppiumBehavior", false);
((DesiredCapabilities) desiredCapabilities).setCapability("useAppiumForHybrid", false);
((DesiredCapabilities) desiredCapabilities).setCapability("useAppiumForWeb", false);
}
To upgrade the Quantum framework from version 1.20 to 1.21:
-
Make the following changes in the
pom.xml
file:CopyRemove the QAF dependencies
<qaf.version>2.1.14</qaf.version> <qafsupport.version>2.1.14</qafsupport.version>
Coming soon:
- Upgrade of Java client to 7.3.0
- Creation of a switch to enable the API check before the driver creation