Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
appium-wait-plugin
Advanced tools
Appium version 2.0
Tested with appium v2.0.0-beta.42
sessionId/waitplugin/timeout
- sessionId/waitplugin/getTimeout
plugin: getWaitTimeout
is renamed to plugin: getWaitPluginProperties
- plugin: getWaitTimeout
is renamed to plugin: setWaitPluginProperties
Install the plugin using Appium's plugin CLI, either as a named plugin or via NPM:
appium plugin install --source=npm appium-wait-plugin
No special action is needed to make things work on the client side.
The plugin will not be active unless turned on when invoking the Appium server:
appium --use-plugins=element-wait
To override the default element-wait retry
Use appium server CLI --plugin-element-wait-timeout=30000 --plugin-element-wait-interval-between-attempts=200 --plugin-element-wait-exclude-enabled-check="click,clear"
Use appium server config file. Refer.
Before wait-plugin
wait = new WebDriverWait(driver, 30);
wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("login"))).click();
wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider1")));
driver.findElementByAccessibilityId("slider1").click();
WebElement slider = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider")));
WebElement slider1 = wait.until(presenceOfElementLocated(MobileBy.AccessibilityId("slider1")));
After wait-plugin
driver.findElementByAccessibilityId("login").click();
driver.findElementByAccessibilityId("slider1").click();
driver.findElementByAccessibilityId("login").sendKeys('Hello');
While overriding timeouts one can choose to override all or one of the below
WDIO Example
await driver.executeScript('plugin: setWaitPluginProperties', [
{
timeout: 1111,
intervalBetweenAttempts: 11,
},
]);
await driver.executeScript('plugin: getWaitPluginProperties', [])
or
await driver.executeScript('plugin: setWaitPluginProperties', [
{
timeout: 1111,
},
]);
await driver.executeScript('plugin: getWaitPluginProperties', [])
Java Example
driver.executeScript("plugin: setWaitPluginProperties", ImmutableMap.of("timeout", 1111 , "intervalBetweenAttempts", 11 ));
Server logs will be as below:
[Appium] Plugins which can handle cmd 'findElement': element-wait (sessionless)
[Appium] Plugin element-wait (sessionless) is now handling cmd 'findElement'
[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector
[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector
[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector
[Plugin [element-wait (sessionless)]] Waiting to find element with accessibility id strategy for login selector
[Plugin [element-wait (sessionless)]] Element with accessibility id strategy for login selector found.
[Plugin [element-wait (sessionless)]] Checking if login element is displayed
[Plugin [element-wait (sessionless)]] login element is displayed.
Before performing actions such as click
, setValue
, clear
etc, plugin waits for element to be enabled.
As mentioned in #78 if there is a need to skip the elementEnabled
check for a set of commands, excludeEnabledCheck
can be sent along with timeout values.
wdio
await driver.executeScript('plugin: setWaitPluginProperties', [
{
timeout: 1111,
intervalBetweenAttempts: 11,
excludeEnabledCheck: ['click','setValue']
},
]);
await driver.executeScript('plugin: getWaitPluginProperties', [])
By default excludeEnabledCheck
is empty list.
FAQs
An appium 2.0 plugin that waits for element to be found
The npm package appium-wait-plugin receives a total of 162 weekly downloads. As such, appium-wait-plugin popularity was classified as not popular.
We found that appium-wait-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.