Trouble Detecting Element

4 posts, 0 answers
  1. Pravin
    Pravin avatar
    22 posts
    Member since:
    Dec 2016

    Posted 16 May Link to this post

    Hi guys,

    I've having trouble detecting an element using Telerik Test Studio. It's an element in Sharepoint Online in IE11.

    I'm looking to click and select the "Business Development CORP Set" selection as shown in image (Business Development CORP set.PNG) but Telerik Test Studio can't detect the element. 

    When i use normal recording option, Telerik just able to detect the container of the selections but no the individual selections. (Cointaner.PNG)

    I tried using coded step based on the DOM but still unable to detect the particular selection and the assert fails. As the element is nested in the DOM, i used these codes : 

    Element documentSet = Find.ByAttributes("id=ctl00_PlaceHolderMain_ctl00_SelectCandidate", "multiple=multiple" ,"value=0x0120D520002D8D5909BD994D82BE83C7681DC18B2F");

     Assert.IsNotNull(documentSet , "Record not found.");
     ActiveBrowser.Actions.Click(documentSet)

    Here's the screen shot of the DOM (DOM1.PNG). As there are two values for "title" parameter, i had to use the "value" parameter. (Tried "title =Business Development CORP Set") but still unable to detect. 

    Here's are the tags as per image DOM1.PNG

    <select name="ctl00$PlaceHolderMain$ctl00$SelectCandidate" title="Possible values" id="ctl00_PlaceHolderMain_ctl00_SelectCandidate" style="width: 190px; height: 150px; overflow: auto;" ondblclick="GipAddSelectedItems(ctl00_PlaceHolderMain_ctl00_Picker_m); return false" onchange="GipSelectCandidateItems(ctl00_PlaceHolderMain_ctl00_Picker_m);" multiple="multiple">

    <option title="Business Development CORP Set" value="0x0120D520002D8D5909BD994D82BE83C7681DC18B2F">Business Development CORP Set</option>

    Hope you guys can give some guides :)

    Thanks,

    Pravin

     

     

     

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 21 May Link to this post

    Hi Pravin,

    Thank you for the detailed information. 

    First I would like to know if the reason to go for a coded solution is that you couldn't record the steps with the recorder? 

    If this is so please let me know what are the recorded step and what is the failure information when executing these? Which is the browser you recorded the steps against? Did you try to use Chrome or Firefox for recording? Is there any difference in the behavior? 

    If you would like to explicitly use coded step here is how you could identify elements in code

    Please let me know if the above information is helpful to you or you have any other queries. Thanks in advance! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Pravin
    Pravin avatar
    22 posts
    Member since:
    Dec 2016

    Posted 23 May in reply to Elena Tsvetkova Link to this post

    Hi Elena,

    The reason i tried using coded steps is because Telerik recording is not able to select/detect the particular choice of selection in the container. (Cointaner.PNG). I'm looking to select Business Development Corp Set.png selection. The step that is recorded is "
    Select by value: '0x010104' in PlaceHolderMainSelectCandidateSelect " and the attributes for this element are :

    id - ctl00_PlaceHolderMain_ctl00_SelectCandidate

    tagname - select 

    These two attributes are not sufficient to make a selection and the suggestion attributes are not good enough as well. 

    What happens right now is when the "Select by value: '0x010104' in PlaceHolderMainSelectCandidateSelect" executes, nothing happens and the choice is not selected/clicked. 

    I couldn't try it in Chrome or Firefox as my company policy doesn't allow me to add Telerik extensions to these two both browser.Also the default browser i would need to execute the scripts is IE. 

    Thanks,

     

     

     

     

  4. Vera
    Admin
    Vera avatar
    0 posts

    Posted 25 May Link to this post

    Hello Pravin,

    Let me interfere in this conversation since Elena is out of office for the day.

    Thank you for the provided information.

    We suggest try using Chained Find Expression for finding the element without the need of implementing code.
    However, if this does not solve the issue, please provide us with a Failure information or a sample test so we could perform further investigation on the case. 

    Thank you for your cooperation in advance.

    Regards,
    Vera
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top