How to locate the element

33 posts, 0 answers
  1. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 05 May 2015 Link to this post

    Hi, i have a problem with comboboxes. At first, I record a new web-test. In settings I select tagIndex as element location logic. And it works, then, when I click on combobox button (I want to select a person from list), telerik writes step "ImageClick". Then, when combobox opens, I find the item by tag "inner text". When I have only one such combobox, it's ok, but when I have two such comboboxes with the same items (persons), telerik opens both of them. But they have differ tagIndexes (img:25 and img:26). Help me to solve my problem.
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 05 May 2015 Link to this post

    Hi Alex,

    "telerik opens both of them"

    That makes no sense (no I'm not in any way implying you're a liar, only that your description defies how I know Test Studio works). Test Studio will only target and act on one UI element. It's not possible for one step to do something like click on two elements either concurrently or one right after the other.

    I need to see this happening first hand to diagnose what's going on. Is it possible for us to access your web application directly (I assume it's a web application)? I just need a publicly accessible URL I can connect to, plus instructions how to get to the problem page and reproduce this problem.

    Regards,
    Cody
    Telerik 
  3. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 06 May 2015 Link to this post

    ok, our site works in our local web. Later, I'll publish it on accessible server. And now, let's sure that all I do is coorect:

    1. In project settings -> In Identification logic I have only two rows (TagIndex and TextContent). That's all what I changed.I did it because our web application has dinamic id's of elements.

    2. Than I began to record new test.

    3. When I record a step with ckicking on combobox, my step is "Click ExtGen563Image" (we use ExtJS). Then I go to the "Find element window" and see filter : TagIndex is exactly img:25 (for example). In this combobox I have a list of persons.

    4. When we have only one such combobox it's ok, but when we have two such comboboxes on the same form(window) it opens both of them but not at firs step ("Click ExtGen563Image") but at second step. It's like at first step telerik doesn't knows about second combobox, but at second step he knows about first one and opens it too.

    Maybe I do something wrong or I must change some settings. And later I'll publish our aaplication.

    Thanx for help.

  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 06 May 2015 Link to this post

    Hi Alex,

    If the find is set to "TagIndex is exactly img:25" then Test Studio will find the 26th <img> element and click on it. It can't click on the 26th and another one, like the 29th one. Test Studio just doesn't work that way.

    Do you have an ETA to publishing your web application for me to look at? I could also setup an online meeting where you can demonstrate this happening on your computer. Though keep in mind I'm in Austin, TX which is Central time zone.


    Regards,
    Cody
    Telerik 
  5. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 07 May 2015 Link to this post

    We record a video but the size is 10 MB. I can send it on your mail.
  6. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 08 May 2015 Link to this post

    Please, I need your help. my mail: bakumenko_sasha@mail.ru
  7. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 08 May 2015 Link to this post

    Please? I need your help!!!! my mail: bakumenko_sasha@mail.ru
  8. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 08 May 2015 Link to this post

    Please? I need your help!!!! my mail: bakumenko _ sasha @ mail . ru
  9. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 08 May 2015 Link to this post

    Please? I need your help!!!!
  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 11 May 2015 Link to this post

    Hello Alex,

    I apologize for the delay getting back to you. I am temporarily overloaded and still catching up. I shared a private DropBox folder for you to upload large files to.

    Regards,
    Cody
    Telerik 
  11. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 12 May 2015 Link to this post

    Hi Cody,

     

    Thanx for an idea with dropBox, that's our video: https://www.dropbox.com/s/wq38ow0tlr5m1tq/Untitled1.fbr?dl=0 .

     

    Alex

  12. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 12 May 2015 Link to this post

    Hello Alex,

    That is the strangest behavior I have ever seen! It looks like Step 17 opens the correct drop down while step 19 opens the dropdown for 17 plus the next dropdown it was supposed to open. Is that correct> I have no idea what could cause this. I need a way to reproduce this on my machine so i can study the behavior in order to figure out what is going on.

    I am curious what happens if you set SimulateRealClick for step 19, our problem step?

    Regards,
    Cody
    Telerik 
  13. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 14 May 2015 Link to this post

    Hello Cody,

    by means of "realClick" partly helped because the second combobox separately began to open, but now we have a problem with a chosen item in this combobox. We do it through Edit_Element-> Find_Settings = ext:qtip contaions "text". Because through TagIndex item doesn't get out. these comboboxes have different values "text", but telerik choose both of them in the first combobox. Do you have an idea, how to choose an item in combobox correctly.

    Regards,
    Alex
  14. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 14 May 2015 Link to this post

    Hello Cody,

    by means of "realClick" partly helped because the second combobox separately began to open, but now we have a problem with a chosen item in this combobox. We do it through Edit_Element-> Find_Settings = ext:qtip contaions "text". Because through TagIndex item doesn't get out. these comboboxes have different values "text", but telerik choose both of them in the first combobox. Do you have an idea, how to choose an item in combobox correctly.

    Regards,
    Alex
  15. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 15 May 2015 Link to this post

    Hi Alex,

    Since every application is custom and unique, I cannot definitevely tell you how to fix this without seeing all of your test as well as getting a first hand look at your application. I need to see the DOM for your application before I can suggest a good Find Expression.

    I am also concerned why all of your steps are recorded as Click on Div or Click on Image. Normally a Telerik RadComboBox is recorded as shown in the attached screen shot.

    Regards,
    Cody
    Telerik 
  16. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 18 May 2015 Link to this post

    Hi

    This is DOM for our form. We use ExtJS in our site, maybe that's why our steps are recorded as Click on Div or Click on Image. Rename this file to .txt

    Regards,

    Alex

  17. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 19 May 2015 Link to this post

    Hi Alex,

    Thank you for the DOM snapshot. Unfortunately none of the drop down options are present in the DOM which prevents me from offering a better way of finding and selecting an options for your specific application.

    Knowing that you use ExtJS I found this demo page I could study. The first thing I discovered is that you're right, due to the way they construct their comboboxes they are recorded in Test Studio as a Click on Div when you click on the drop down arrow. Using this demo page I found a method that may work better for you. I describe it in this short video:

    http://screencast.com/t/W3L9BukN


    Regards,
    Cody
    Telerik 
  18. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 21 May 2015 Link to this post

    Hi Cody,

     

    thank you for this video. And I am waiting for your next video (I am sure that you can solve my problem)

     Regards,

    Alex

  19. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 22 May 2015 Link to this post

    Hi Cody,

    Also, I have a problem with choosing an item from table in ExtJS. An attribute unselectable is set "on". When we try to find element, it's ok. Telerik doesn't send a message, that couldn't find the element. But we can't choose an item or click on it by using "SimulateRealClick". I attach files, to see the DOM of element change DOM-file to txt.

    Regards,

    Alex

  20. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 May 2015 Link to this post

    Hi Alex,

    And I am waiting for your next video (I am sure that you can solve my problem)

    Sorry I am confused by this statement. What next video were you expecting? I don't recall promisting any follow up video. Or did you just mean anything I may send in the future?

    Also I must apologize. I didn't realize the audio did not get recorded with my last video. I'll have to re-record it.

    Unfortunately the small DOM snippet you sent does not help. I think at this point it would be better to setup an online meeting where I can see your application first hand and work with you on getting the test script working the way you need it to. Let me know what timezone you're in and your availability and I'll setup the meeting. I'm located in Austin, Texas, which is Central time zone.

    Regards,
    Cody
    Telerik 
  21. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 23 May 2015 Link to this post

    Hi Cody,

    your last video demonstrates how to lacate an item in single ExtJS combobox. But in the end of your page you have two comboboxes with the same items. In this case in our tests, when we try to locate element by InnerText in these comboboxes, Telerik opens the second combobox, but chooses and changes this items in first combobox, and in the second combobox the chosen item is empty. 

    And as for my last post, we have a td tag with div tags list, and we want to choose an element wth a help of TagIndex element. Telerik founds this element, but he could'n select it(simulate real click doesn't help - in this case Telerik cooses an item, which located in the centre of the screen). That's why I send you DOM of this element in order to find the attribute,that blocks this action.

    Regards,

    Alex

  22. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 26 May 2015 Link to this post

    Hi Alex,

    The big problem with trying to automate ExtJs comboboxes is that the combobox itself and the list of options to select are in two completely separate and virtually unrelated <div> elements. Have a look at the two attached screen shots for an example what I'm referring to. Notice how the list of options are put into a <div> element which is dynamically added to the end of the DOM. The options, and the <div> container they are put into, don't even exist in the DOM until the combobox is opened to show the options.

    For this reason I asked to setup an online meeting where I can study your application and work on solving this problem with you.


    Regards,
    Cody
    Telerik 
  23. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 29 May 2015 Link to this post

    Hi Cody,

    I understand my mistake, now we use "Add a new group of filters" option to locate the element. Start element is our combo-list. We find it with a help of "TagIndex" tag. In "Find Element" window we find our item (with a help of Validate button). We select an item with a help of filter : TagIndex -> is exactly -> div:1 . In "Find Element" window it's ok, but when we start our test, combobox is opening but it doesn't select an item. And when I "Edit element" in "Live version" telerik finds it. "Simulate real click" doesn't help.

    please, HELP!!! 

    Regards, Alex

  24. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 30 May 2015 Link to this post

    Hello Alex,

    I would love to help. The only way I can do that is to see your application first hand and experiment with different approaches to this problem until we come up with a solution. There are two ways I can see your application first hand:
    1. You send me a publicly accessible URL I can put into a browser to connect to your app. I'll need instructions how to navigate your application to get to the problem drop down.
    2. We setup an online meeting where you can show me the application running on your computer along with the problem drop down.

    Either way I'll experiment with your drop down until I find the right combination that works. I don't know what will work until I see it and experiment with it.

    Which route do you want to take?


    Regards,
    Cody
    Telerik 
  25. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 03 Jun 2015 Link to this post

    Hello Cody,

    Unfortunately, I couldn't publish my app on accessible URL, my chief forbided to do this. I can only discribe my problem. Maybe it helps. Or I can record a video with demonstrating my situation. Also, when you answered me, it was a.m. 05.00 hours. That's why I'm not sure that we can setup an online meeting(((

    And now, I can describe my last sittuation with two comboboxes. In first  combobox Telerik chooses an item very well. In second combobox Telerik opens the list, but doesn't select an item. But when we locate (only locate) the mouse on this list, Telerik finds an item at once. And I don't uderstand how does it work.

    When I try to repeate this problem in a new project with one form and two comboboxes only, everything is working. Maybe the size of DOM affects on Telerik? Because the version of extjs was the same.

    Regards,

    Alex

  26. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 03 Jun 2015 Link to this post

    Hello Alex,

    Are you on Moscow time? If true, my 9am (US Central Time) is your 6pm. I can do that.

    I doubt the size of the DOM would make that much of a difference, though I admit technically almost anything is possible.

    Yes a video showing what happens will help a little though I REALLY need to be able to reproduce the problem and experiment with the application before I can come up with a solution. Another approach would be for you to capture a Fiddler trace of your application running normally in a browser without Test Studio even running. We have about a 75% success rate using a Fiddler trace to simulate your web application and reproducing problems for us to fix. Do you want to try this route?

    If you do please follow these steps:
    1. Start FiddlerCap
    2. Click Clear Cache
    3. Click Clear Cookies
    4. Check Decrypt HTTPS traffic
    5. Check Store binaries
    6. Start capture
    7. Launch your browser
    8. Navigate to your website
    9. Navigate to the problem page
    10. Open both drop downs
    11. Stop capture
    12. Save capture
    13. Put the .saz file into a .zip file and attach that to this support ticket
    14. Include navigation instructions for your application (click here, enter X there, etc.)

    I can use that to simulate your web server and try to reproduce the problem.


    Regards,
    Cody
    Telerik 
  27. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 04 Jun 2015 Link to this post

    Hello Cody,

    I captured a Fidler trace of our application. Also I put the extJS, which we use. If there is few information in this fidler-file,I will describe my actions more detailed. I separate extJS for tow zip archives. App.jpg is App.saz.

    Regards,

    Alex

  28. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 04 Jun 2015 Link to this post

    Hello Alex,

    I am unable to open extjs1.jpg and extjs2.jpg. What type of files are these? They don't appear to be image files, or Fiddler traces or .zip files. I can successfully open app.jpg as a Fiddler trace file.

    Please do NOT rename the file extensions of files. Instead please create a new .zip file and add things like the Fiddler trace to the .zip file then attach the .zip file. When you rename the extension it causes problems transferring the files (they are interpreted as the wrong file type) and too confusing on my end how to open the file.

    The Fiddler trace appears to be working but now I need directions how to navigate to the problem area. I get logged on and get to the home page - see attached screen shot. Now what do I click on?

    Regards,
    Cody
    Telerik 
  29. Alex
    Alex avatar
    22 posts
    Member since:
    Apr 2015

    Posted 17 Jun 2015 Link to this post

    Hello Cody,

    I can't attach .zip files because Allowed extensions: .jpg, .jpeg, .gif, .png.

    ExtJS1-2 that was extJS library. 

    Click on "Учет л/с" - second button in this menu.
    And, I have one more question: is it correct to locate element with a help of tagIndex (id is dinamic)? Because we faced with such situation:

    1.yesterday we recorded a test, everything was ok

    2.today we run it once more, and telerik can't find a button (in all elements we use TagIndex)

    3.the reason was, that one record was added to the main grid with all records(Persons) and therefore all our TagIndexes of elements increased (TagIndexes ++). Than we began to change our findlogic to EnnerText is exactly 'Text', but some controlls doesn't have any InnerText (for example comboboxes). What we must do to rosolve this problem?

    Regards, Alex

  30. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 19 Jun 2015 Link to this post

    Hello Alex,

    I can't attach .zip files because Allowed extensions: .jpg, .jpeg, .gif, .png.

    Ah, I see you're right. I was unaware of this restriction. My apologies.

    Personally I try to avoid using TagIndex when the index value is above 9. The higher the index value the more brittle using TagIndex becomes for the very reason you already ran into "that one record was added to the main grid".

    When faced with an element that doesn't have static unique properties I can use to locate it I will use what we call a "chained find expression" instead. The concept is to locate some sort of container/wrapping element first, such as a <div>, then under that element find the one I want, possibly using TagIndex or some other unique property. Maybe I can use the class attribute or hret of src.


    Regards,
    Cody
    Telerik 
Back to Top