Its xpath is :
/html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr
I am using the syntax as:
int rowCount = SetupClass.oDefaultSelenium.getXpathCount("//html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr").intValue();
System.out.println(rowCount);
But is always returing the value as 0.
Regards
G
--
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.
Thanks for ur reply: But Result is zero only :(
On 7/20/10, Krishna chaitanya <ckrishna...@gmail.com> wrote:
> Hi ,
>
> getXpathCount("//table[@id='dgAdminGroups'/tbody/tr").intValue();
>
> System.out.println(rowCount);
>
> should be enough to get the row count of the table .
>
>
>
>
> On Tue, Jul 20, 2010 at 5:38 PM, Gursharan Singh
> <singh.g...@gmail.com>wrote:
>
>> Hi All
>> I wish to get row count of a table.
>>
>> Its xpath is :
>>
>> /html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr
>>
>> I am using the syntax as:
>>
>> int rowCount =
>> SetupClass.oDefaultSelenium.getXpathCount("//html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr").intValue();
>> Â Â Â Â Â Â Â Â Â Â Â Â System.out.println(rowCount);
>>
>> But is always returing the value as 0.
>>
>> Regards
>> G
>>
>> --
>> 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
Thanks for ur reply: But Result is zero only :(
> Hi ,
>
> getXpathCount("//table[@id='dgAdminGroups'/tbody/tr").intValue();
>
> System.out.println(rowCount);
>
> should be enough to get the row count of the table .
>
>
>
>
> On Tue, Jul 20, 2010 at 5:38 PM, Gursharan Singh
> <singh.g...@gmail.com>wrote:
>
>> Hi All
>> I wish to get row count of a table.
>>
>> Its xpath is :
>>
>> /html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr
>>
>> I am using the syntax as:
>>
>> int rowCount =
>> SetupClass.oDefaultSelenium.getXpathCount("//html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr").intValue();
>> Â Â Â Â Â Â Â Â Â Â Â Â System.out.println(rowCount);
>>
>> But is always returing the value as 0.
>>
>> Regards
>> G
>>
>> --
>> 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-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
i.e. /html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr
>> >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
On 7/20/10, Brian Rock <bria...@gmail.com> wrote:
> So are you saying that in Firebug you are getting multiple matches for your
> xpath string? i.e. is your xpath unique enough to return unambiguous
> results?
>
> Brian
>
>
> On Tue, Jul 20, 2010 at 9:23 AM, Gursharan Singh
>> >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
boolean x = SetupClass.oDefaultSelenium.isElementPresent("xpath=//html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr");
System.out.println(x);
int rowCount =
SetupClass.oDefaultSelenium.getXpathCount("//html/body/form[@id='Form1']/table/tbody/tr[5]/td/table[@id='dgAdminGroups']/tbody/tr").intValue();
System.out.println(rowCount);
>> >> >> <selenium-users%2Bunsu...@googlegroups.com<selenium-users%252Buns...@googlegroups.com>
>> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>> >
>> >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>> <selenium-users%25252Bun...@googlegroups.com<selenium-users%2525252Bu...@googlegroups.com>
>> >> >> <selenium-users%252Buns...@googlegroups.com<selenium-users%25252Bun...@googlegroups.com>
>> <selenium-users%25252Bun...@googlegroups.com<selenium-users%2525252Bu...@googlegroups.com>
>> >
>> >> <selenium-users%25252Bun...@googlegroups.com<selenium-users%2525252Bu...@googlegroups.com>
>> <selenium-users%2525252Bu...@googlegroups.com<selenium-users%252525252B...@googlegroups.com>