Skip to content

Commit 75f38d0

Browse files
committed
remove handle function and fix for iOS
1 parent 225c11d commit 75f38d0

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "appium-wait-plugin",
3-
"version": "1.0.0-beta.6",
3+
"version": "1.0.0-beta.7",
44
"description": "An appium 2.0 plugin that waits for element to be found",
55
"main": "./lib/index.js",
66
"scripts": {

src/element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function sessionInfo(driver, strategy, selector) {
7979
const automationName = _getAutomationName(driver);
8080
if (automationName === 'XCuiTest') {
8181
return {
82-
baseUrl: `${driver.wda.webDriverAgentUrl}`,
82+
baseUrl: `http://${driver.wda.webDriverAgentUrl}`,
8383
jwProxySession: driver.wda.jwproxy.sessionId,
8484
body: JSON.stringify({
8585
using: strategy,

src/plugin.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,4 @@ export default class WaitCommandPlugin extends BasePlugin {
66
await find(driver, args);
77
return await next();
88
}
9-
10-
async handle(next, driver, cmdName, ...args) {
11-
if (cmdName === 'click' || cmdName === 'setValue') {
12-
const locatorArgs = JSON.parse(JSON.stringify(args));
13-
const elementId = locatorArgs[0];
14-
const isEnabled = await driver.elementEnabled(elementId);
15-
if (!isEnabled) throw new Error('Element is not enabled!');
16-
}
17-
return await next();
18-
}
199
}

0 commit comments

Comments
 (0)