Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
seli
Posts : 7
Join date : 2012-05-11

How to get selected an item from table by using select command of IDE Empty How to get selected an item from table by using select command of IDE

Fri May 11, 2012 2:47 pm
Hi all,
I have to select an item from table by using select(selectLocator, optionLocator).......... of Selenium IDE.
I have no id for selectLocator, so I can not specify selectLocator, please help me.
I am stuck on this issue since a few days.
rohit13
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 38
Location : INDIA
http://radical-qa.blogspot.in/

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Fri May 11, 2012 3:36 pm
can you please share HTML of particular area.????So it will help us to solve your problem..
avatar
seli
Posts : 7
Join date : 2012-05-11

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Fri May 11, 2012 4:27 pm
O.K.
Let us imagine we typed "junit" in google. I want selenium select first match i.e. first row of box with suggestions.
I give you this explanation only without any HTML of particular area, because I am a new member do not allow me to send it. It give me the following message:
"New members are not allowed to
post external links or emails for 7 days.
"
avatar
anbarasi
Amateur
Amateur
Posts : 49
Join date : 2012-04-30
Age : 36
Location : chennai

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Mon May 14, 2012 4:27 pm
hi .. i faced a problem in my application like if i enter a text it should show th e matching customers in drop down that was using jquery so i tried with focus and type key command on that and it worked , im not sure that my reply may help u
avatar
vikas.gandhi
Posts : 5
Join date : 2012-03-20

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Mon May 14, 2012 4:32 pm
Hi Seli,

I will be good if you can share HTML of particular area. It would help to solve you actual problem.

For your above mentioned google problem. You can solve it like this -

selenium.type("lst-ib", "junit");
selenium.wait(3000);

selenium.click("xpath=/html/body/table/tbody/tr/td[2]/table/tbody/tr[1]/td/div/table/tbody/tr/td");

It will select first row.

Thanks,

Vikas Gandhi
avatar
seli
Posts : 7
Join date : 2012-05-11

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Tue May 29, 2012 6:31 pm
vikas.gandhi wrote:Hi Seli,

I will be good if you can share HTML of particular area. It would help to solve you actual problem.

For your above mentioned google problem. You can solve it like this -

selenium.type("lst-ib", "junit");
selenium.wait(3000);

selenium.click("xpath=/html/body/table/tbody/tr/td[2]/table/tbody/tr[1]/td/div/table/tbody/tr/td");

It will select first row.

Thanks,

Vikas Gandhi


Hi,
sorry for may delay.
It is a part form the HTML:

Code:


[table style="width: 100%;" class="gssb_m" cellpadding="0" cellspacing="0"][tr class=""][td class="gssb_a gbqfsf" dir="ltr" style="text-align: left;"]
[table style="width: 100%;" cellpadding="0" cellspacing="0"][tr][td style="width: 100%;"]
            [color=red]junit[/color]
        [/td][td]

[url=http://seleniumforum.forumotion.net/#ifl]Чувствам се късметлия »
[/url]
[/td][/tr][/table]
[/td][/tr][tr class=""][td class="gssb_a gbqfsf" dir="ltr" style="text-align: left;"]






[table style="width: 100%;" cellpadding="0" cellspacing="0"][tr][td style="width: 100%;"]junit[b] tutorial
[/b]

[/td][td]
[url=http://seleniumforum.forumotion.net/#ifl]Чувствам се късметлия »
[/url]
[/td][/tr][/table]
[/td][/tr][tr class=""][td class="gssb_a gbqfsf" dir="ltr" style="text-align: left;"]


[table style="width: 100%;" cellpadding="0" cellspacing="0"][tr][td style="width: 100%;"]
junit[b] test[/b]
[/td][td][url=http://seleniumforum.forumotion.net/#ifl]Чувствам се късметлия »[/url][/td][/tr][/table][/td][/tr][tr class=""][td class="gssb_a gbqfsf" dir="ltr" style="text-align: left;"]



[table style="width: 100%;" cellpadding="0" cellspacing="0"][tr][td style="width: 100%;"]junit[b] eclipse[/b][/td][td]
[url=http://seleniumforum.forumotion.net/#ifl]Чувствам се късметлия »[/url][/td][/tr][/table][/td][/tr][/table]




Excuse me for bed formatting. I want to select the first occurrence of word "JUnit"
avatar
jhonykishore
Posts : 1
Join date : 2012-09-12

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Wed Sep 12, 2012 12:35 am
Hi Guys,

I'm very new to Selenium. I got a quick question.

I'm trying to get the text from a cell of a table using the getTable method. But i don't know how to find the name of the Table?
I know the coordinates of the cell (0_2) but how do i find out the name of the table to use this method.

Here's the Automation ID of the Entire table:
chain=automationName:WDataGrid_6$1573_6$16776/automationName:WDataGrid_WDataGrid_6$1573_6$16776

This is the Syntax of the getTable method:
getTable

public java.lang.String getTable(java.lang.String tableCellAddress)
Description copied from interface: Selenium
Gets the text from a cell of a table. The cellAddress syntax tableLocator.row.column, where row and column start at 0.
Specified by:
getTable in interface Selenium
Parameters:
tableCellAddress - a cell address, e.g. "foo.1.4"
Returns:
the text from the specified cell

please help.

Thank you
Sponsored content

How to get selected an item from table by using select command of IDE Empty Re: How to get selected an item from table by using select command of IDE

Back to top
Permissions in this forum:
You cannot reply to topics in this forum