Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable extract data from dynamic webtable
#1
Solved: 10 Years, 9 Months ago At 
Hi
I am automating a webapplication,
where i need to work on a web table which is unable another web table.
the web table is dynamic web table it is having more than 10 columns and in row it will display as per the data available.

but when i do the row count and columncount
Code:
browser().page().frame().webtable().rowcount
browser().page().frame().webtable().columncount(1)
it is displaying 4 rows and 2 columns
with getcelldata(2, 2)
it is displaying all columns
for ex: i am having col1, col2, col3, col4
getcelldata(2, 2) is displaying all the columns in a single location 2 row and 2 column col1, col2, col3, col4,
if i do the getcelldata(3, 2) all the data available in the table is displayed in the same location like below...
col1name1name2col2address1address2col3address3address4 etc

i want to clik on the checkbox in the firt column based on the data in the table.
There are three tables in a page
1. Item
2. Statement 1
3. Cashbook

statement and cashbook is within the Item table
when i spy any item in the statement table it will show the hirarchy will be
browser
.......page
..........module
................item
.......................Statement
.................................webelement


with GUI spy it is only showing the item and statement table and the webelement.

it is not showing the table underneth statement

Please find the attachment of web page
and the results of the statements of both the tables

Please help me is there solution ASAP.


Attached Files Image(s)
   
Reply
#2
Solved: 10 Years, 9 Months ago
Try using :

Code:
Browser().page().Webtable().ChildItem(1,1,"WebElement",0).getcelldata(row,column)

It worked for me.
Reply
#3
Solved: 10 Years, 9 Months ago
Hi Amoghrane,

Your above code looks a bit strange to me !

Code:
Browser().page().Webtable().ChildItem(1,1,"WebElement",0)
-> this will return a WebElement from the cell(1,1) and once its retured you are using "GetCellData" method which infact is not applicable for "WebElement" Object class.

Hope you too agree with the above ?
Reply
#4
Solved: 10 Years, 9 Months ago
Hi sreekanth ,

I got what u r saying but this is a working code that i have pasted above giving the expected results. I cannot explain how. I had tried it out because webtable().getcelldata() was giving all the values from the table.....Just try it out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Link in a webtable in a webtable Soulwalker 1 2,698 07-19-2017, 01:44 PM
Last Post: Ankur
  How to extract particular digit from a string amit25007 3 3,276 10-05-2016, 10:49 AM
Last Post: Ankur
  How to identify dynamic webtable as unique in QTP? sudheendramurthy 4 18,080 02-23-2016, 06:16 PM
Last Post: vinod123
  Unable to click on WebButton in WebTable srach84 1 2,902 02-09-2015, 09:07 PM
Last Post: arpan
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,641 06-13-2014, 04:27 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)