Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to get values of childItem of a webtable
#11
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
inrtxt=Browser("Name:=CDD").Page("Title:=CDD").WebTable("name:=Refresh View").WebTable("name:=Ignore").Object.rows(1).cells(1).innertext
identifier ="innertext:="&inrtxt
a=Browser("Name:=CDD").Page("Title:=CDD").WebTable("name:=Refresh View").WebTable("name:=Ignore").WebElement( identifier).GetROProperty("outertext")
msgbox(a)

Reply
#12
Solved: 11 Years, 3 Months, 3 Weeks ago
Hey inborntester, thanks for the reply but i m getting msgbox blank.
and can you please explain me what is
Code:
.Object.rows(1).cells(1).innertext
Reply
#13
Solved: 11 Years, 3 Months, 3 Weeks ago
its a DOM feature, google it further to get idea.
Ensure row and column index may differ from gtp identification.
try the codes after removing ".WebTable("name:=Refresh View")"
Reply
#14
Solved: 11 Years, 3 Months, 3 Weeks ago
hi,

I think i got my solution on using just
Code:
inrtxt=Browser("Name:=CDD").Page("Title:=CDD").WebTable("name:=Refresh View").WebTable("name:=Ignore").Object.rows(1).cells(1).innertext
msgbox inrtxt

Thank you inborntester...
cheers.
Reply
#15
Solved: 11 Years, 3 Months, 3 Weeks ago
hi friends,

Need help!!


1st Problem:
As suggested i am getting outerhtml of webtables.
Now i want qtp to wait until outerhtml of my webtable changes

I am using the below code:
Code:
Browser("Name:=CDD").Page("Title:=CDD").WebTable("name:=Refresh View").WebTable("name:=Ignore").Object.rows(1).cells(1).waitproperty "outerhtml", micRegExpMatch("<TD style=" & "COLOR: \#([f|F|0]{6})"& ">[\w\W]*?</TD>")

Error message:: "Object doesn't support this property or method"


2nd Problem:
I am having problem in asking qtp to wait until a button appears:-
but button appears when my outerhtml of above cell is blue(td color), and if it is red then button doesn't appear(that means there is some error)

problem is when button is red my second webtable name changes to "Delete" and when it is blue it changes to "Ignore"

so if i tell qtp to wait until button is visible, then qtp fails when there is some error(because button will not visible if it is failed)
Please suggest the correct way..

(I know my question is not related to this post but as a reference of code snippets posted earlier, posting in this thread )

Thanks & Regards
Zeeshan

Reply
#16
Solved: 11 Years, 3 Months, 3 Weeks ago
for the first problem try below code. i am not sure with micRegExpMatch of your needs. object identification should work for the below code. get back if any issues in regexp.

Code:
outerHTML=Browser("Name:=CDD").Page("Title:=CDD").WebTable("name:=Refresh View").WebTable("name:=Ignore").Object.rows(1).cells(1).outerHTML
identifier="outerhtml:="&outerHTML
a=Browser("HTML Tables").Page("HTML Tables").WebElement(identifier).waitproperty "outerhtml", micRegExpMatch("<TD style=" & "COLOR: \#([f|F|0]{6})"& ">[\w\W]*?</TD>")

Reply
#17
Solved: 11 Years, 3 Months, 3 Weeks ago
Refer below code:

Quote:rc=Browser("name:=Web Table").page("title:=Web Table").WebTable("html tag:=TABLE").RowCount
For r=1 to rc
cc=Browser("name:=Web Table").page("title:=Web Table").WebTable("html tag:=TABLE").ColumnCount®
Next

For r=1 to rc
For c=1 to cc
if Browser("name:=Web Table").page("title:=Web Table").WebTable("html tag:=TABLE").ChildItemCount (r,c,"Link")>0 then
set linkobj1= Browser("name:=Web Table").page("title:=Web Table").WebTable("htmltag:=TABLE").ChildItem(r,c,"Link",0)
print "Row:"&r&" Column:"&c&" "+ linkobj1.Getroproperty("innertext")
end if
msgbox linkobj1.Getroproperty("innertext")
Next
Next
Reply
#18
Solved: 11 Years, 3 Months, 3 Weeks ago
(12-09-2009, 02:08 PM)can you try these one  set oObj =  Browser("B").Page("P").WebTable("WT:").ChildItem(2, 1, "WebEdit", 0)b=' oObj.GetROProperty("value")msgbox b Wrote: hi everyone ,

i have an issue with WebTable.
one of the cell of my web table has a "WebEdit" object
And my requitment is to read the value of WebEdit object and display it using msgbox.

i tried following:
--------------------- cut from code------------------------------------
Code:
set  a =  Browser("B").Page("P").WebTable("WT:").ChildItem(2, 1, "WebEdit", 0)
b= a.GetROProperty("value")
msgbox b
-------------------- end of cut-----------------------------------------

when i run this script , I get error message " Object required a"
what must be the problem with above code?

MY OR contains following:

browser-->page-->webedit,webtable
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Link in a webtable in a webtable Soulwalker 1 2,829 07-19-2017, 01:44 PM
Last Post: Ankur
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,863 06-13-2014, 04:27 PM
Last Post: vinod123
  Unable to read numeric values from WebTable into Datatable Akhila 2 4,692 11-26-2013, 03:43 PM
Last Post: Akhila
  Webtable().GetCellData() Returns hidden values of Cells ssvali 4 5,952 06-07-2013, 08:37 PM
Last Post: kawsar
  How to compare local sheet values with run time data table values? test71 2 8,424 03-14-2008, 07:09 PM
Last Post: test71

Forum Jump:


Users browsing this thread: 1 Guest(s)