Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Secha Test 2.0

  1. #11
    Sencha User
    Join Date
    Jun 2011
    Posts
    79
    Vote Rating
    2
      0  

    Default

    EditScenerio.jpg
    Can't see Test Type in +Advanced option

    Thanks for your response.

  2. #12
    Sencha - Test Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Location
    Palo Alto, CA
    Posts
    75
    Answers
    5
    Vote Rating
    3
      0  

    Default

    Go to Preferences (the gear icon) -> General and set your "Role" to "Developer". Restart Studio, and you should be able to select the scenario Type in the 'Advanced' section.
    Marcelo Bukowski de Farias
    Sencha Test - Development Team

  3. #13
    Sencha User
    Join Date
    Jun 2011
    Posts
    79
    Vote Rating
    2
      0  

    Default

    Thanks for your response.
    I did that and it shows me everything working OK with green tick (test passed).
    One thing i wanna ask is how to add .and() function to check the values captured by St.play
    Like if i have a login page and i wanna test either user put the right values or not how can i test them with this st.play feature,
    will you give an example

    Second thing is when i do try to record my test in Dev. mode it only captures the first tap and then stop capturing (i did perform a lots of other clicks but it didn't capture that), so i switch back to Automate Eng mode to do capture that
    is it the way it always works(sencha studio).?

    Thanks a lot for your help

  4. #14
    Sencha User
    Join Date
    Jun 2011
    Posts
    79
    Vote Rating
    2
      0  

    Default

    Hi,
    Will you please help me.?
    Thanks

  5. #15
    Sencha - Test Dev Team
    Join Date
    Mar 2016
    Posts
    56
    Answers
    6
    Vote Rating
    1
      0  

    Default

    Hi Rohan,

    First:
    Do you want to assert a correct value in a text field? You could use one of several text... or value... methods

    http://docs.sencha.com/sencha_test/2...ml#method-text

    http://docs.sencha.com/sencha_test/2...l#method-value

    there are examples at both of those URLs.

    Second:
    If by Dev mode you mean an in-browser test then yes, if you try to record a page that navigates away from the starting URL the recording will not function after navigation. This is why we have the WebDriver scenario type to handle page navigations.

  6. #16
    Sencha User
    Join Date
    Jun 2011
    Posts
    79
    Vote Rating
    2
      0  

    Default

    Thanks for your response.
    I actually want to ask that in the recorded code

    Code:
    ST.play([       
           { type: "tap", target: "@btnStudent", x: 59, y: 23 },
            { type: "tap", target: "textfield[name=\"textfield-1229-inputEl\"]", x: 68, y: 13 },
            { type: "type", target: "textfield[name=\"textfield-1229-inputEl\"] => input", text: "abcd", caret: 0 },
            { type: "tap", target: "#studentJoinAssignmentButton", x: 262, y: 284 },
                ]);
    is there a way to manually change the things .
    like the first line
    { type: "tap", target: "@btnStudent", x: 59, y: 23 },
    does it returns us something so we can deal with it. if do then where and how.

    Like in var a =ST.Future.Element('someid')

    in this now we can do perform diff actions using this variable 'a'

  7. #17
    Sencha - Test Dev Team
    Join Date
    Mar 2016
    Posts
    56
    Answers
    6
    Vote Rating
    1
      0  

    Default

    Recordings are a great way to get started but if you want to get fancier you should convert to using the Futures API as you are mentioning.

    Your recording above could be converted to the following code:
    Code:
    var button = ST.element('@btnStudent');
    var field = ST.textField('textfield[name="textfield-1229-inputEl"]'); // not sure if you need => input in this case, YMMV
    var joinButton = ST.element('#studentJoinAssignmentButton');
    
    button.click();
    field.click().type('abcd');
    joinButton.click();
    click() clicks in the center of the element by default so it's probably fine to remove the xy coordinates.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 3 Feb 2017, 8:59 AM
  2. Replies: 5
    Last Post: 2 Feb 2017, 8:42 AM
  3. Replies: 2
    Last Post: 4 Aug 2016, 4:27 AM
  4. ExtJs 6 Jasmine without Secha Test Studio
    By Nareshreddy123 in forum Ext 6: Q&A
    Replies: 1
    Last Post: 15 Apr 2016, 9:46 AM
  5. Replies: 4
    Last Post: 26 Jan 2016, 3:13 AM

Tags for this Thread

Posting Permissions

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