Results 1 to 2 of 2

Thread: Test cases written on Sencha Test EA won't run on Sencha Test GA .Button click event

  1. #1

    Default Test cases written on Sencha Test EA won't run on Sencha Test GA .Button click event

    hi
    earlier i was using Sencha Test 2.0 EA. I have written few test cases . it work , but when i am running same test case on Sencha test GA . My Button click not get fired ;

    here is login test case code :

    describe("Log in Test", function() {
    var page = {
    nameField : function(){
    return ST.textField('textfield[name="username"]');
    },
    passwordField : function(){
    return ST.textField('textfield[name="password"]');
    }
    };
    it("Home Page should Be Displayed ", function(done) {
    page.nameField().focus().type('[email protected]');
    page.passwordField().focus().type('password');
    ST.button('button[itemId="submit-button"]').
    click(10, 10).
    wait(10000).
    getUrl(function (url) {
    expect(url).toContain('home.do');
    });
    ST.component('#dashboardToolbar');
    done();
    });
    });



    With Sencha Test GA :
    works fine still inserting username and password ..
    but button click event won't work .

    even

    1. ST.button('button[itemId="submit-button"]').focus() ; // works
    2. ST.play([
    { type: "tap", target: "button[itemId="submit-button"]", x: 65, y: 7 } // this also work
    ]);

    I tried with :

    ST.button('button[itemId="submit-button"]').click(); //without x,y coordinates
    ST.button('button[itemId="submit-button"]').click(65,7); // x,y coordinates capture by event recorder


    what i have to do to get click event on button ?

  2. #2
    Sencha User
    Join Date
    Mar 2016
    Posts
    59
    Answers
    6

    Default

    Do you get an error?

    One thing I would mention is that in your test case the done() is not needed. ST API methods take care of waiting for completion of each method. So remove the done parameter in your it() and the done() call at the end. The result of running will be the same and you code will be simpler.

    Can you add some code after ST.button() to debug what is found or not?

    Code:
    ST.button('button[itemId="submit-button"]').and(function (button) {
      console.log(button)
      debugger
    })
    and run with the Debug button instead of the Run button in Studio.

Similar Threads

  1. Replies: 5
    Last Post: 2 Feb 2017, 8:42 AM
  2. Replies: 1
    Last Post: 9 Aug 2016, 3:46 AM
  3. Replies: 2
    Last Post: 4 Aug 2016, 4:27 AM
  4. Replies: 3
    Last Post: 3 Aug 2016, 5:01 AM
  5. Replies: 2
    Last Post: 2 Aug 2016, 7:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •