ios - How to identify UI Elements from Sencha Touch App for Testing with Appium? -


i having trouble writing client-side tests using latest version (0.4.0) of node.js library: https://github.com/admc/wd. using sencha touch 2.4.

i can selenium webdriver connected appium app (v 1.4.13) server in turn seems load sencha touch app in specified iphone simulator. can inspect elements appium inspector.

however, when writing tests, unable identify of ui elements on initial view of app. in sencha architect have set button component id property primary-login-container-new-account-button.

for example, each of these cases below, appears element never found. i'm afraid dynamic generation of elements sencha reason why can't find elements. yet, i've read selenium option ui testing sencha apps, must possible right? project wrapped in cordova.

1.

[...] it("should able click on create new account button1", function () {   return driver     .elementbyid('primary-login-container-new-account-button')     .text().should.become('create new account'); }); // error: [elementbyid("primary-login-container-new-account-button")] error response status: 7, , nosuchelement - element not located on page using given search parameters. selenium error: element not located on page using given search parameters. 

2.

it("should able click on create new account button2", function () {   return driver     .elementbyaccessibilityid('primary-login-container-new-account-button')     .text().should.become('create new account'); }); // error: [elementbyaccessibilityid("primary-login-container-new-account-button")] error response status: 7, , nosuchelement - element not located on page using given search parameters. selenium error: element not located on page using given search parameters. 

3.

it("should able click on create new account button3", function () {   return driver     .elementbyidornull('primary-login-container-new-account-button', function(err, element) {   }); }); // returns element , err null 

4.

it("should able click on create new account button4", function () {     return driver       .elementbycssselector('#primary-login-container-new-account-button')       .text().should.become('create new account');   }); // error: [elementbycssselector("#primary-login-container-new-account-button")] error response status: 9, , unknowncommand - requested resource not found, or request received using http method not supported mapped resource. selenium error: invalid locator strategy: css selector 

5.

it("should able click on create new account button5", function () {   return driver     .elementbyname('createuseraccountbutton')     .text().should.become('create new account'); }); // error: [elementbyname("createuseraccountbutton")] error response status: 7, , nosuchelement - element not located on page using given search parameters. selenium error: element not located on page using given search parameters. 

6.

 it("should able click on create new account button6", function () {    return driver      .waitforelementbyid('#primary-login-container-new-account-button', 30000)      .text().should.become('create new account');  });  // error: [waitforelementbyid("#primary-login-container-new-account-button",30000)] element condition wasn't satisfied!  [...] 

just trial since app built on cordova, inspect element primary-login-container-new-account-button using inspect devices on chrome/safari. prior being able access it, there must attributes css or class must find while inspecting. having said if able inspect them using chrome/safari viewing webview must switching context webview access elements here.

since elements generated dynamically sencha, might possible these attributes assigned random key-value. in case have specify generated value access view elements.

note : great @ screenshot of chrome inspected elements on view application along appium inspector screenshot corresponding same.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -