Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving default value from embedded webedit from webtable
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
I need to retrieve the default value from webedit which is embedded in a webtable and compare the value with some standard value. Below given is the code:

Code:
Set oPage = browser("Creationtime:=0").Page("title:=.*")
On error resume next

Set OTableCount=Description.Create
OTableCount("micclass").value="WebTable"
Set OTableIndex=oPage.ChildObjects(OTableCount)

For i=0 to OTableIndex.count-1
            iRows=OTableIndex(i).rowcount
            iCols=OTableIndex(i).getroproperty("cols")
  For j=1 to iRows
  For k=1 to iCols
Set abc=OTableIndex(i).childitem(j,i,"WebEdit",0)

If abc.getroproperty("value")="1,000.00" then
    
print "abc"
'do some things

end if
next
next
next


To summarize, the code above should go through all the webtables in a page.It verifies whether the cell of the webtable has an webedit.If the webedit is present then it should retrieve the default value and compare with 1,000.00

when I ran this code it is printing "abc" for every loop.Am not sure what is going wrong.
Thanks in advance for the help.
The issue has been resolved. Mistakenly put i instead of k in "Set
Code:
abc=OTableIndex(i).childitem(j,i,"WebEdit",0)
".The corrected code is "Set abc=OTableIndex(i).childitem(j,k,"WebEdit",0)"
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,
Code:
Set abc=OTableIndex(i).childitem(j,i,"WebEdit",0)
use
Code:
Set abc=OTableIndex(i).childitem(j,k,"WebEdit",0)

Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to identify controls embedded within WinListView cells Devesh Thakur 5 2,868 04-19-2018, 10:56 AM
Last Post: Devesh Thakur
  Link in a webtable in a webtable Soulwalker 1 2,863 07-19-2017, 01:44 PM
Last Post: Ankur
  Embedded Text on webpage srach84 1 2,770 07-28-2014, 07:35 AM
Last Post: Ankur
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,934 06-13-2014, 04:27 PM
Last Post: vinod123
  Retrieving Text from a PDF file smartkarthi 2 4,761 08-22-2013, 11:44 AM
Last Post: smartkarthi

Forum Jump:


Users browsing this thread: 1 Guest(s)