Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetRowwithCellText(dataTable.Value())
#1
Not Solved
hi, can anyone help me with the below code...

Code:
Set oDesc = Description.Create
oDesc("micclass").value= Link
temp=DataTable.Value("A", dtGlobalSheet)
row=Browser("XYZ").Page(ABC").WebTable("MNO").GetRowWithCellText(temp,1,1)
set Link =Browser("XYZ").Page(ABC").WebTable("MNO").childItems(row,1,"Link",0)
Link.click

Running this code, i get either "object required" error or "invalid aruguments" passed error on Set link line.
my datatable has a integer value. Can GetRowWithCellText and Datatabale value go together?

scenario of the script is , I create a request and capture the request number say 005 in datatable. on a different web page, i open a web table which shows me the created requests. I need to click the link against the request 005. the web table has 5 coloumns and link to be clicked is in last coloumn
eg:
request decsription date Price
001 .... .... 100 Link
002 ... .... 100 Link
and so on..
so for every new request created a new row gets added in web table with the request number, i need to select that newely created request.
i tried using above script but it isnt working as expected...
Reply
#2
Not Solved
ChildItems is not a valid method.
Change it to ChildItem

Still if it shows "object required" error, it means there is no "Link" object at that row, column position!
Reply
#3
Not Solved
I corrected to ChildItem.
I modified the code a bit which worked for me Smile

Code:
Ref = Trim(DataTable("A", dtGlobalSheet))
LinkText = "LINK"
row = Browser("").Page("").WebTable("").GetRowWithCellText(A,1,1)
A = Cint(row)
CCell = Browser("").Page("").WebTable("").GetCellData(A,5)
Set objLink = Browser("").Page("").WebTable("").ChildItem(A, 5, "Link", 0)
Wait("3")
objLink.Click

Thank you for immediate reply.
Reply
#4
Not Solved
that's good
Reply
#5
Not Solved
Even I'm having a prob

Hi I was trying to click a link in a webtable. Link is present in 3 column and 2nd row. I'm using childitem and getrowwithcelltext

code is :

Code:
row=browser().Page().webtable().getRowWithCellText("Price",3,1)
set link=browser().Page().webtable().childitem(row,3,"Link",0)

but qtp throws error for 2nd line and says general error. Wrong number of arguments has been pased or invalid property assignment.

Can somebody tell whats wrong there[/align]
Reply
#6
Not Solved
Hi,
remove parenthesis and try it.

code is
Code:
row=browser().Page().webtable().getRowWithCellText "Price",3,1
set link=browser().Page().webtable().childitem row,3,"Link",0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)