Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to retrieve cell values in the WebTable of portal application
#1
Not Solved
Hi, I want to retrieve the cell data in the WebTable. For that I have defined a new test object under the browser and have given html tag and text as the test object properties. But while I try to identify it it says 'Object description is not unique'. I tried adding innerhtml, outerhtml, innertext and outertext along with the ordinal identifiers; but no use. What more properties need to be added to identify it? Also I want to enable smart identification for this object but the field is disabled in the object repository for this object alone(In QTP tools->object identification the enable smart identification checkbox is enabled). How do I enable it?
Reply
#2
Not Solved
Hi This is a common problem encoutered while tring to get data from a web table. Try this:
Before you use the webtable use Browser().Fullscreen
This will make the position of the abs_x and abs_y constant
then using the Object spy check for the location of abs_x or abs_y
CVhoose one amongst them for your scripting
Remove all other properties
Then use this:
Code:
WebTableExist=Browser(...).Page(...)WebTable(abs_x:=443").Exist
I used DP for my coding to eliminate the dependency of OR. but then u can use this abs_x property to identify your webtable

Check whether the tool is identifying your table using Webtable().Exist property

if exist then

Code:
WebTableExist=Browser(...).Page(...)WebTable(abs_x:=443").getCellData()
This will return an array
?Using ths split function you can get the exact value from on the cell
Hope this help
Regards
Karthik
Reply
#3
Not Solved
@ ViV_Karthy :
FYI , GetCellData() will not return an array (As it returns particular cell value itself)

@ Sreedevi:
For retrieving the Cell values of WebTable :
Step1: Find the rowcount of Webtable
Step2: Use for loop using this Rowcount
Step3: use GetCellData(i,2) & store the cell values into variable.

Example: (here i am trying to retrieve the values of Cell of column '2' for all rows)
Code:
rc=Browser(..).Page(..).WebTable(..).RowCount
for i=1 to rc
    Cell_Val=Browser(..).Page(..).WebTable(..).GetCellData(i,2)
    Msgbox Cell_Val
Next
Reply
#4
Not Solved
Hi Karthik,
Thanks for your reply. I could get the cell values in the webtable by using the abs_x property.

@Sreekanth: In portal application, the webtable was identified as webElement. So I created one new test object from OR. In such case the cell values cannot be retreived from the webtable, any unique property has to be taken and then your code can be used. Thanks for your reply.

Regards,
Sreedevi.
Reply
#5
Not Solved
I want to store the values in an array how do I this.

All values of webtable in an array
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT doesn't recognize SAP objects when it's openned by portal DevRenanGaspar 0 2,493 09-28-2017, 07:41 PM
Last Post: DevRenanGaspar
  get visible cell data values from webtable Satwik 1 4,518 07-24-2014, 11:57 PM
Last Post: supputuri
Question How to retrieve an XML data from a column in DB Ramya Devadoss 0 2,223 05-10-2013, 11:43 AM
Last Post: Ramya Devadoss
  Automating SAP portal using QTP/BPT QTPUser@work 2 4,887 12-13-2012, 08:43 PM
Last Post: QTPUser@work
Shy Trying to use QTP to test through access portal csutter2002 0 1,971 09-21-2012, 10:00 PM
Last Post: csutter2002

Forum Jump:


Users browsing this thread: 1 Guest(s)