Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search criteria check based on some filter
#1
Not Solved
Hi,
There is a filter for us to search the application that were submitted with in a certain range.when i clicked on search it gives list of application in a table format, it also gives the count of theApplications.Now i need to check,
1.The count number and the number of applications in the grid are same.
2.Search option based onone particular scenario for EgSadAll Matched).How can i check whether all the applicatons searched with status Matched.(there is a separate column for Status in the Grid).

Thanks
Ramakrishna
Reply
#2
Not Solved
Code:
for i=0 to browser(111).page().frame().webtable().RowCount
          if browser(111).page().frame().webtable().GetCellData(i,coloumnNumber)="Matched" then
                      Flag=True
            else
                       Flag=False
                       Exit for
             Next

if Flag=True then
            Report Pass
else
            Report Fail
End if



This will help you

Thanks
~Nilesh
Reply
#3
Not Solved
Code:
'get the numbe of application in the table
i=browser("bbb").page("bbb").frame("fff").webtable("kkk").RowCount
'comparing the count number and number app displayed in table
if (i=browser("bbb").page("bbb").WebEdit("tt").getROProperty "value"
msgbox "The count number and the number of applications in the grid are same."
pcount=0;fcount=0;
for x=0 tobrowser("bbb").page("bbb").frame("fff").webtable("kkk").RowCount -1
  if browser(111).page().frame().webtable().GetCellData(i,coloumnNumber)="Matched" then
     Pcount=Pcount+1
  else
     Fcount=Fcount+1
  end if
--This woud return number of pass and fail
Reply
#4
Not Solved
Hi MahalaxamiDevi,

what is the logic behid


Code:
browser("bbb").page("bbb").frame("fff").webtable("kkk").RowCount -1

substracting 1 from Row Count


Can you Pls Explain?


Thanks
Reply
#5
Not Solved
@Everyone - please wrap your code to make the most more readable.

Reply
#6
Not Solved
For webtable, the The first object has an index(cell) of 0. So instead start from 1, you should start the 0 and substracting 1 from Row Count as end value.
Reply
#7
Not Solved
Thank you all for Responding, i will try this and come back
Reply
#8
Not Solved
Hi
Itried the code given by Nilesh, but i am facing problem like not able to identify the Object. So i just want to explain the Table and id's defined as there is no permission for me to attach the screen shot. I apolize for that.
The main Table is defined by the id:_ct10_cphContent_downloadAspxGrid_DXMainTable
Headers in the Table are defined as id : _ct10_cphContent_downloadAspxGrid_DXHeaderRow
The columns in the table are defined by id : _ct10_cphContent_downloadAspxGrid_DXTScol3(3-12)
The Rows are Defined as id : _ct10_cphContent_downloadAspxGrid_DXDataRow0(0-9)
Below is the summary to give the count and it is defined as
id : _ct10_cphContent_downloadAspxGrid_DXPageBottom.

The code used by me:
Code:
Browser("Company Downloads").Page("Company Downloads").WebList("_ctl0:cphContent:searchFilterC").Select "Last 30 Days"
Browser("Company Downloads").Page("Company Downloads").WebButton("Search").Click
for i=0 to Browser("Company Downloads").Page("Company Downloads").Frame("_ct10_cphContent_downloadAspxGrid_DXMainTable").WebTable("_ct10_cphContent_downloadAspxGrid_DXPageBottom").RowCount

        If  Browser("Company Downloads").Page("Company Downloads").Frame("_ct10_cphContent_downloadAspxGrid_DXMainTable").WebTable("_ct10_cphContent_downloadAspxGrid_DXTcol11").GetCellData(i, 11)="Matched" Then
            Flag=True
            Else
            Flag=False
        End If
Next
Before writing this code i have whole page to the repositary.Even then when i am executing this code it shows an error.Please some one help me...
Reply
#9
Not Solved
which object you are not able to identify?
Try to highlight the object , check the Propertys of the object.




Thanks
Reply
#10
Not Solved
Hi Nil,
Sorry for Responding Late.Here i have attached the code used in the test executed by me.Here it is not able to identify ("_ct10_cphContent_downloadAspxGrid_DXMainTable").
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CyberArk CorePAS REST API to search for accounts pramod 0 837 06-29-2023, 03:11 PM
Last Post: pramod
  Search All Test scripts For a Function? AndyBSG 1 2,722 02-19-2015, 04:15 AM
Last Post: supputuri
  What is the criteria of identify the object based on Base & option filter properties Suma Parimal 2 3,130 01-28-2014, 06:35 PM
Last Post: Suma Parimal
  Search for a string in all the files under all subdirectory Mahesh27 1 2,199 07-03-2013, 03:24 PM
Last Post: Sathiya
  Testing Search box kriday 1 2,526 06-26-2013, 08:51 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)