How to check for a row value for paginated records ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2010
01:11 AM
03-31-2010
01:11 AM
How to check for a row value for paginated records ?
Hi,
I have a need to find out the status of an invoices generated dynamically.I am able to find the invoice number/status for a fixed set of records(in my case 10/page).So my question is for pagination how will I find the concerned link and go to the page for a particular invoice # and find the status. I am testing pages of Oracle EBS.
Thanks,
Girish
I have a need to find out the status of an invoices generated dynamically.I am able to find the invoice number/status for a fixed set of records(in my case 10/page).So my question is for pagination how will I find the concerned link and go to the page for a particular invoice # and find the status. I am testing pages of Oracle EBS.
Thanks,
Girish
Girish
27 REPLIES 27
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2010
07:58 PM
04-01-2010
07:58 PM
Hi,
You need to move through pages (click the link/button/whatever which moves you to the next page) and use the Find method on each page to find your invoice by its number. Once Find returns an object with Exists equal to True, work with this object.
You need to move through pages (click the link/button/whatever which moves you to the next page) and use the Find method on each page to find your invoice by its number. Once Find returns an object with Exists equal to True, work with this object.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2010
05:09 AM
04-02-2010
05:09 AM
Thanks Jared. Please have a look at the following code,I am able to compare Invoice# as text and I need to click the link coming in some other cell corresponding to that row, which I am ..
PropArray = Array("Link")
ValuesArray = Array("500.00")
' Specifies the property values
'ValuesArray(0) = "Link"
'ValuesArray(1) = "500.00"
Set obj = pagefn.Find(PropArray, ValuesArray, 20000)
I guess the depth is 20,000,I mean to take that going thro' all the child objects.obj.Exists ,but returns false.
Am I missing something here ?
PropArray = Array("Link")
ValuesArray = Array("500.00")
' Specifies the property values
'ValuesArray(0) = "Link"
'ValuesArray(1) = "500.00"
Set obj = pagefn.Find(PropArray, ValuesArray, 20000)
I guess the depth is 20,000,I mean to take that going thro' all the child objects.obj.Exists ,but returns false.
Am I missing something here ?
Girish
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010
01:36 AM
04-05-2010
01:36 AM
Hi,
Is the link you want to click located in the same table row as the invoice#? If it is, just obtain the corresponding row cell as it is described in the "Parsing HTML Tables" help topic.
Is the link you want to click located in the same table row as the invoice#? If it is, just obtain the corresponding row cell as it is described in the "Parsing HTML Tables" help topic.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2010
09:01 AM
04-08-2010
09:01 AM
That's done Jared .Thanks But if I want to click the pagination links,that's also working,but once I reference the table object to try & get the rows and cells ,VBScript error 'Unspecified Error' comes up.I checked exists property,returns true ,but rows.length is throwing the 'Unspecified error exception'.Please review the function below for your review.I use this function to loop thro,after getting page and table.First page is ok,if data is not there,it clicks the Next pagination link,from there the above error related to tableobj appears
Function LoopCells(tableobj,matchtext)
if tableobj.exists Then
Log.Message("tableobj exists ")
Log.Message(tableobj.rows.length) ' This gives error
end if
For i = 1 To tableobj.RowCount-1
'Sys.Process("iexplore").Page("*").Form("DefaultFormName").Panel(0).Panel(2).Panel(0).Panel(1).Table("SearchHdr").Cell(3, 0).Table(0).Cell(0, 0).Panel(0).Panel(0).Table(2).rows.item(i).cells.length
Set row=tableobj.rows.item(i)
'MsgBox(tableobj.rows.item(i).cells.length)
For j = 0 To Row.cells.length - 1
' get the cell
Set cell = row.cells.item(j)
Log.Message "Cell " + ": " + Cell.innerText
if (Cell.innerText=matchtext) Then
Result = CBool(1 + 1 = 2)
LoopCells=Result
exit function
else
Result = CBool(1 + 1 = 5)
LoopCells=Result
end if
Next
Next
End Function
Function LoopCells(tableobj,matchtext)
if tableobj.exists Then
Log.Message("tableobj exists ")
Log.Message(tableobj.rows.length) ' This gives error
end if
For i = 1 To tableobj.RowCount-1
'Sys.Process("iexplore").Page("*").Form("DefaultFormName").Panel(0).Panel(2).Panel(0).Panel(1).Table("SearchHdr").Cell(3, 0).Table(0).Cell(0, 0).Panel(0).Panel(0).Table(2).rows.item(i).cells.length
Set row=tableobj.rows.item(i)
'MsgBox(tableobj.rows.item(i).cells.length)
For j = 0 To Row.cells.length - 1
' get the cell
Set cell = row.cells.item(j)
Log.Message "Cell " + ": " + Cell.innerText
if (Cell.innerText=matchtext) Then
Result = CBool(1 + 1 = 2)
LoopCells=Result
exit function
else
Result = CBool(1 + 1 = 5)
LoopCells=Result
end if
Next
Next
End Function
Girish
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2010
01:46 AM
04-09-2010
01:46 AM
Hi,
Can you post here an image of this exception? In which exact line does it occur?
Can you post here an image of this exception? In which exact line does it occur?
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2010
03:40 AM
04-09-2010
03:40 AM
With ref. to what I said ".I
use this function to loop thro,after getting page and table.First page
is ok,if data is not there,it clicks the Next pagination link,from
there the above error related to tableobj appears"
I did the mistake of getting the page and table and referencing it same when I move to the next page ,so I am checking whether data I want exists after getting again the page and table,I also do a wait and refresh of the page(going by one of your recommendations in a post).
My thought process is ,if the table is not created dynamically(html source doesn't show that),why would one need to create the page and table again to reference the same.Looks like the object is destroyed when it goes to the next page .Just wanted to check this is correct?
And one more thing.. I am trying to write a generic function ,based on data to be found ,it would go thro' paginated records and initiate a click action either on a button/link which can be on any cell on a row.
How do I get that ,unless otherwise I pull up the type specified in an excel? Can this be done like get the cells in that row,based on excel value,then either click the link/button ?Just get the excel value and use Link() / Button() ??
use this function to loop thro,after getting page and table.First page
is ok,if data is not there,it clicks the Next pagination link,from
there the above error related to tableobj appears"
I did the mistake of getting the page and table and referencing it same when I move to the next page ,so I am checking whether data I want exists after getting again the page and table,I also do a wait and refresh of the page(going by one of your recommendations in a post).
My thought process is ,if the table is not created dynamically(html source doesn't show that),why would one need to create the page and table again to reference the same.Looks like the object is destroyed when it goes to the next page .Just wanted to check this is correct?
And one more thing.. I am trying to write a generic function ,based on data to be found ,it would go thro' paginated records and initiate a click action either on a button/link which can be on any cell on a row.
How do I get that ,unless otherwise I pull up the type specified in an excel? Can this be done like get the cells in that row,based on excel value,then either click the link/button ?Just get the excel value and use Link() / Button() ??
Girish
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2010
04:37 AM
04-12-2010
04:37 AM
Hi,
Yes, this happens because the page is reloaded.
Use the Find method, search by text.
Looks like the object is destroyed when it goes to the next page .Just wanted to check this is correct?
Yes, this happens because the page is reloaded.
I am trying to write a generic function ,based on data to be found
Use the Find method, search by text.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2010
10:02 AM
04-12-2010
10:02 AM
Thanks Jared,Can you post a small code sample/link to a sample ?Because I am not sure of the properties/values to be passed in Find method for link/button.For button,object finder reveals a Image.Is there a way to get the objectType ? I saw the objectType in ObjectTree .
Girish
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2010
08:05 PM
04-12-2010
08:05 PM
Hi,
To get the object type, use the objectType property. As for finding links and buttons, you can try using innerText to address them by captions without using object types at all. This way, you can create code which will click any object with the specified text.
To get the object type, use the objectType property. As for finding links and buttons, you can try using innerText to address them by captions without using object types at all. This way, you can create code which will click any object with the specified text.
------
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Yuri
TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
