This discussion is archived
7 Replies Latest reply: Feb 26, 2013 1:33 AM by 989378 RSS

Unable to capture the adf table column sort icons using open script tool

989378 Newbie
Currently Being Moderated
Hi All,

I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.

1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.

2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.
  • 1. Re: Unable to capture the adf table column sort icons using open script tool
    957200 Newbie
    Currently Being Moderated
    Hi,

    1. You cannot record column sort objects. Use the func <Table Object>.columnSort("Ascending","Amount"); Here first parameter is "Ascending"/"Descending". Seconf parameter is name of column you wish to sort.
    2. for the second issue try <object>.getHTMLAttribute("innerText");
    You can also try "getColumnHeaderString" to get all the column headers separated by special character like "|"

    In any case if the above 2 does not work plz update the exact object types ... ie; adf.table or ...

    Edited by: TSBKeerti on Feb 8, 2013 4:58 PM
  • 2. Re: Unable to capture the adf table column sort icons using open script tool
    989378 Newbie
    Currently Being Moderated
    Thank you for the reply. I tried both approaches using the exact objects but i was not able to solve the issue yet. Any further help is appreciated.
  • 3. Re: Unable to capture the adf table column sort icons using open script tool
    957200 Newbie
    Currently Being Moderated
    Hi ,
    Please paste the code thats not working (2 lines before and 2 lines after) for both the solutions, i will try to debug.
  • 4. Re: Unable to capture the adf table column sort icons using open script tool
    989378 Newbie
    Currently Being Moderated
    Hi keerthi,


    1. I have pasted the code for the first issue

    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
         {

                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
                        
         }
  • 5. Re: Unable to capture the adf table column sort icons using open script tool
    957200 Newbie
    Currently Being Moderated
    HI,
    I have tested this on adf table and its working fine.

    May be its some issue with wait time. Please add Thread.sleep(20000); before and after sort statement.


    Below is the code thats woking absolutely fine.

    adf.table("/web:window[@index='0' or @title='Contracts - Contracts - Oracle Applications']/web:document[@index='0' or @name='xijrugsbq_1']/web:ADFTable[@absoluteLocator='pt1:USma:MAnt1:pt1:conDashbrdMain1:r2:r1:tldc:taskTable']").columnSort("Ascending", "Title");
    Thread.sleep(10000);

    adf.table("/web:window[@index='0' or @title='Contracts - Contracts - Oracle Applications']/web:document[@index='0' or @name='xijrugsbq_1']/web:ADFTable[@absoluteLocator='pt1:USma:MAnt1:pt1:conDashbrdMain1:r2:r1:tldc:taskTable']").columnSort("Descending", "Title");
  • 6. Re: Unable to capture the adf table column sort icons using open script tool
    957200 Newbie
    Currently Being Moderated
    Add some "Think" time before and after the statement. Try both Ascending and Descending sort options on table.
  • 7. Re: Unable to capture the adf table column sort icons using open script tool
    989378 Newbie
    Currently Being Moderated
    Thanks Keerthi, I was able to fix the above issue but I am still unable to read the panel header text using getHTMLAttribute() or getAttribute(). I tried and explored few other ways butnothing worked for me. Can u suggest any other way of doing this.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points