Selenium for Java [java]-Selenium.getText() and selenium.getTable() doesn't work

1,070 views
Skip to first unread message

preb

unread,
Jun 25, 2010, 10:45:10 AM6/25/10
to Selenium Users
Hi,

I am reading the contents from the report.

1.selenium.getTable("xpath=//div[3]/div/div/div/div/div/table.1.0");

I get the row.column undefined error

2. I also tried selenium.getText("xpath=//div[3]/div/div/div/div/div/
table/tbody/tr[1]/td");

ERROR: Element xpath=//div[3]/div/div/div/div/div/table/tbody/tr[1]/td
not found

Any help is greatly appreciated.

Thanks!

MJS QA

unread,
Jun 25, 2010, 1:46:40 PM6/25/10
to Selenium Users
Does the site use frames?Then you may need to select proper frame
before giving the relative xpath......

Also the 2 statements you have given point to 2 different cells

1.selenium.getTable("xpath=//div[3]/div/div/div/div/div/table.
1.0"); => points to the cell in second row,first column

2. I also tried selenium.getText("xpath=//div[3]/div/div/div/div/div/
table/tbody/tr[1]/
td");
=> points to the cell in first row,first column

Elias Nogueira

unread,
Jun 29, 2010, 12:27:41 PM6/29/10
to seleniu...@googlegroups.com
Remove "xpath=" and use the path starting with two slash's

selenium.getTable("//div[3]/div/div/div/div/div/table.1.0");

Regards!
--
Elias Nogueira

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


van

unread,
Aug 13, 2010, 10:29:24 PM8/13/10
to Selenium Users
getTable table starts with 0 for both columns and rows
Xpath table rows and columns starts with 1

On Jun 29, 9:27 am, Elias Nogueira <elias.nogue...@gmail.com> wrote:
> Remove "xpath=" and use the path starting with two slash's
>
> selenium.getTable("//div[3]/div/div/div/div/div/table.1.0");
>
> Regards!
> --
> Elias Nogueira
>
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages