Forum Discussion

shafay's avatar
shafay
Occasional Contributor
6 years ago

The window size is (401, 0);

I have a drop down but it does'nt filter the items filled in when writting text in. like i have a dropdown with YES and NO if i type yes it will only show me YES and so i press tab and it select YES, but here i my case the dropdown is not being filtered it keeps showing all the values and so i cannot select my desired item.

then i have a grid, when i select a record it gives its detail in another grid with edit template.

 

so what it does normaly is selects the item by x and y axis the grid is popluated but when it clicks the grid it shows the ambigous error.

 

it would be great if you help me out here !

 

Note that using the Key  function wont help because it the dropdown is not being filtered by the text i write.

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    HI,

     

    The root cause of the problem is the 'Ambiguous recognition" message in the test log.

    You must check what element was recognized ambiguously and improve its identification nad/or search criteria so that it is uniquely recognized.

     

  • ApplePen's avatar
    ApplePen
    Community Leader

    Hi, shafay  

    Maybe you can try ClickItem(x,y);

    (x,y) is the cells of the grid. 


  • but here i my case the dropdown is not being filtered it keeps showing all the values and so i cannot select my desired item.

    then i have a grid, when i select a record it gives its detail in another grid with edit template.


    Can't say I've experienced this specifically. Only had issues if the text I type in isn't in the list at all. If you know which items and which order, you could possibly work around this by sending the [Down] key a particular amount of times ?

     


    grid is popluated but when it clicks the grid it shows the ambigous error


    Yes, I also find this occurring quite often and I'm not sure why yet. No matter how fine I tune by object recognition. I think DevX may have two items with the same name in a different place in the tabe/grid. E.G all the expand buttons in the grid is just called img. Some day I might try to figure this out, but for now I just tell TC to ignore them.


    when i select a record it gives its detail in another grid with edit template.


    I have had to get creative with this. You may find theres something else that works better for you, but the two approaches I have used:

    1. No matter what the grid contains, DevX always uses the same name for the first row's edit template, second row's edit template etc. This means you can map the items in the edit panel and just ensure that your data is always in the item in NameMapping for the row by e.g. filtering the grid or sorting the grid asc/desc as applicable. This is the one I use most frequently, since It's much faster. You will need to allow some time after sorting/filtering the grid and refresh mapping. TC caches the old grid, so you end up with say, row 2 being picked up when you sent row 3 as aliased object

    2. Use a find on the parent grid for the sub cell/panel (not sure which) you have just expanded. This will be an object you can actually work with that will contain all the sub-controls. Pick up that "grid" object. You can now use standard grid script methods on the grid/combobox/textbox object

  • Vallalarasu_P's avatar
    Vallalarasu_P
    Frequent Contributor

    Page.PanelName.xx.yy.zzz.Cell0104.ClickItem(21,6) is Failed.

     

    The Alternative is if you what to click the item.

    MyHeight= Page.PanelName.xx.yy.zzz.Cell0104.height

    MyWidth= Page.PanelName.xx.yy.zzz.Cell0104.Width

    Then 

    Page.PanelName.xx.yy.zzz.Cell0104.ClickItem(MyHeight/2,MyWidth/2 )

    • RUDOLF_BOTHMA's avatar
      RUDOLF_BOTHMA
      Community Hero

      Vallalarasu_P

      That would work in most cases, but I'm not sure why you would do it in this particular situation.  The limitation specifically with DevX lies in the way DevX does the page layout for grids.  To find the link, you have to first use a .find to get the link object, since DevX mappings are all over when it comes to a grid. Once you find the object, you may have to click the Parent Object, since DevX doesn't always handle the onClick on the node level you expect.  At this point you may find that the link isn't quite in the middle of the Parent object and you have just clicked empty space.  You could apply the click(x,y) on the parent, but by that time, why still calculate the coordinates if you already have the entire object at your disposal to click by simply using .Click();  ?