Results 1 to 8 of 8

Thread: Event recorder issues - Component Query Locator

  1. #1

    Default Event recorder issues - Component Query Locator

    Hi,

    I used the Event recorder, and everything went fine (ST.play() lines were added to the code within an it() method).
    But when I try to launch the test, I have an unexpected error : Failed with error "Component Query locator matches multiple items: "tab[text="Accounts"]"".

    I already checked the page to make sure that there is no other items with the same id.

    Do you have any idea on how to solve this problem?

    Thank you

  2. #2
    Sencha User vojtech.cerveny's Avatar
    Join Date
    Jun 2015
    Location
    Ostrava, Czech republic
    Posts
    52

    Default

    Hi,
    what do you get if you execute in console this command?
    Code:
    Ext.ComponetQuery.query('tab[text="Accounts"]')
    Is it item or array?

    But if you have this error, you have to specify it more - look at doc for it. Something like
    Code:
    Ext.ComponentQuery.query('panel[cls~=my-cls][floating=true][title$="sales data"]');
    And SenchaTest has an ability to NOT fail in this case - but in this case, I don't recommend it to you.
    Selection_130.png

    Fell free to contact me any time.
    Vojt?ch

  3. #3

    Default

    I try the ComponentQuery, and it is an Array.

    I did try to launch the test with the checkbox "Fail locators with multiple tests results" unchecked, and it worked!
    ...
    But I have another error : Failed: Timeout waiting for target (textfield) to be available for pointerdown

    Basically what I am trying to do is simply to create a new account in a table of accounts.
    Everything is fine when the action required is a mouse click, but when it is a keyboard entry, I have this timeout.

  4. #4
    Sencha User vojtech.cerveny's Avatar
    Join Date
    Jun 2015
    Location
    Ostrava, Czech republic
    Posts
    52

    Default

    Ok, if it is array, you need be more specific, otherwise it takes a first item from array and it can do mess in your code. Look at a doc for more information, because you shouldn't use this settings for all cases.

    And for another error - do you click on item menu or something, what appears and disappears after clicking?

    Could you post your code here please?

    Vojt?ch

  5. #5

    Default

    Here is the code :

    event.jpg

    And the Timeout error :
    errorTimeout.png

    There is is no matcher in the spec ; I just wanted to record an event properly.

    The problem may come from the ST.play() commands - maybe add a sleep() somewhere.
    Do you know where I can find any doc on ST.play() commands?

    EDIT : If you need the whole project, I can post it. Just tell me which part of the code you need. Since it is not the same error than before, I will create a new thread for this one.

  6. #6
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    At the time the test stalls out is the textfield present? The message would indicate that there is no result to the query for "textfield"...
    Don Griffin

    "Use the source, Luke!"

  7. #7

    Default

    No, the textfield is not present at the beginning of the test.
    It appears when the button 'Create account' is pressed.

    Is there any command in the ST.play() that allows the system to wait until the textfield pops up (like a sleep() ) ?

  8. #8
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    The ST.play() call schedules each event and the player will wait for the query to find its target, so no need to code up a wait here. Two questions I guess: how long does it take for the textfield to appear? did the action required to display the textfield occur properly?

    If the action is not playing properly for some reason then the textfield won't appear and the timeout will ensure. If the time it takes from action to appearance is longer then 5 seconds you might need to give the event a longer, explicit timeout value.
    Don Griffin

    "Use the source, Luke!"

Similar Threads

  1. Event recorder Guide
    By Daniele.Milani in forum Q&A
    Replies: 4
    Last Post: 20 May 2016, 12:57 AM
  2. Event Recorder Hangs on Launching
    By ruairioliver in forum Bugs
    Replies: 4
    Last Post: 5 Apr 2016, 6:54 AM
  3. Replies: 1
    Last Post: 23 Feb 2016, 11:08 AM
  4. Event recorder
    By mtatsky in forum Bugs
    Replies: 1
    Last Post: 17 Dec 2015, 1:45 PM
  5. Replies: 2
    Last Post: 2 May 2013, 5:54 AM

Posting Permissions

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