Reputation: 2460
I want to automate my tests for an Angular JS site using Ipad Air simulator, appium and protractor but the problem that the test couldn't be passed successfully, it tells me that element couldn't be located and i'm sure about the xpath it's the same generated by appium.
This is my config file
exports.config = {
allScriptsTimeout: 600000,
seleniumAddress: 'http://0.0.0.0:4723/wd/hub',
specs: [
'testsuite/test3.js'
],
capabilities: {
browserName: 'safari',
'appium-version': '1.4.13',
platformName: 'iOS',
platformVersion: '9.3',
deviceName: 'iPad Air'
},
chromeOnly: false,
baseUrl: 'http://urlofmyapp',
frameworks:[
'jasmine'
],
mochaOpts: {
defaultTimeoutInterval:1000000
}
};
My test3.js file contain :
"use strict";
var wd = require("wd");
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
var expect = chai.expect;
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
describe('my app', function() {
it('should make the login test',function() {
var desired = {
browserName: 'safari',
platformName:'iOS',
name:"This is an example for login test"
}
browser.ignoresynchronization=true;
browser.get("theurlofmyapp");
browser.driver.findElement(by.xpath("//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIATextField[1]")).sendKeys("RET02");
});
});
Here the error while running
protractor protractor.config.js
Upvotes: 0
Views: 165