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
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Identifying the element

Fri Dec 18, 2009 9:41 pm
i am having difficulty recognizing elements, can you please tell me how i can use to click these elements

1)i have to hover on the Manage and click the try item,i am not getting a clue how i can do that
class="ricAppMenuHover"> Manage

this is the option in the drop down i have to click
try

2)this is all i have for a button,selenium is recoding this as
selenium.click("//button[@id='']");

but i want to use the value can any one tell me how i can do that
Log in
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

Identifying the element Empty Re: Identifying the element

Mon Dec 21, 2009 2:00 pm
hi,

lets start with first point. You mentioned it's a drop down list. first you have to identify the locator either through selenium ide or xpather. then use this command:
selectAndWait|locator[@class='ricAppMenuHover']|label=Manage.

But if that is ajax control and can be done through mouse hover only, problem will solve. the mouse operations are very tricky in selenium.


2. For solving the button issue, try to use x-pather or firebug to get a locator of the button if not generated with IDE.

Hope this will help you. Best of luck.

Buy
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty it is an azax control

Mon Dec 21, 2009 6:14 pm
Hi,
Thank you for the response
this is how it is ,it is an azax control.can you tell me how i can tell to click this link Private Empty Car Storage from the Drop down Menu item "Manage"

i tried this
selenium.mouseOver("locator[@class='ricAppMenuHover']|label=Manage.");
selenium.click("/ama/secure/manage/monthly");

but did not work,it is not identifying the Mange element
Manage

I tried detecting the button by the xpath but had no luck i got the xpath also by Id which changes as the wicket dynamically generates it every time.
this is the button i want to click

avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 4:54 pm
the xpath is givng as
selenium.click("//*[@id='LOGINFORM']/div/div/div[2]/div/table/tbody/tr[3]/td[2]/span[1]/span/button")

but this i think is not advisible as if anything changes on the page the x path is broken.i am badly looking to use the value of the button
selenium.click("//button[@value=' Log in ']");
but i had no luck as it is not finding the element
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 6:35 pm
hi,

You can identify the element on the basis of text also , if only that text will present on the page like

click| link=log in
click| name=log in
click| id=log in

You can also click on the basis of css. But it tricky to get path and difficult process than above one. But if you have an idea of css hierarchy, then you can do easily.

Hope this help you. best of luck.

Bye
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 6:46 pm
Hi,
thank you for your continuous support
you mean some thing like this
selenium.click("value=' Log in '");

com.thoughtworks.selenium.SeleniumException: ERROR: Unrecognised locator type: 'value'

all i know is the button that has the value as Log In,the button does not have a name.






bye
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:12 pm
No, value is none property to identify the element like this. Install firebug add on in firefox. inspect element from firebug and see the property like id, name etc and provide that into it.

suppose you get id for that button is "sdsadsa_2323"

so use like click|id="sdsadsa_2323"

Use like this , then you are able to click on it.
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:24 pm
i already have firebug installed,the login does not have an id,the id is null.this is the element details

button id="" class=" ricButton2Convert ricButtonMedium ricButtonLoaded" type="submit" name="" title="" value=" Log in "> Log in
avatar
kmahata@gmail.com
Active particpant
Active particpant
Posts : 10
Join date : 2009-11-06

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:29 pm
Hi bull,

Is your first Question answered? if not try this:
selenium.mouseOver("locator[@class='ricAppMenuHover']|label=Manage.")
selenium.focus("/ama/secure/manage/monthly");
selenium.click("/ama/secure/manage/monthly");
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:48 pm
i am element not found,error

com.thoughtworks.selenium.SeleniumException: ERROR: Element locator[@class='ricAppMenuHover']|label=Manage not found
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at c
avatar
kmahata@gmail.com
Active particpant
Active particpant
Posts : 10
Join date : 2009-11-06

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:54 pm
Try css locator then :
css=.ricAppMenuHover
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:55 pm
can you please how i can use in java code
avatar
kmahata@gmail.com
Active particpant
Active particpant
Posts : 10
Join date : 2009-11-06

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:58 pm
selenium.mouseover("css=.ricAppMenuHover")

execute it first and see if its identifying the 'manage' element and a drop down is shown....
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Tue Dec 22, 2009 8:59 pm
can any one tell how to use a title to click the button?
selenium.click("//button[@title='Login']");
avatar
bull
Active particpant
Active particpant
Posts : 10
Join date : 2009-12-18

Identifying the element Empty Re: Identifying the element

Wed Dec 23, 2009 3:46 pm
got the solution,this is is what i used
selenium.click("xpath=//button[contains(text(), 'Log in')]");

any help with the clicking the drop down would help
Sponsored content

Identifying the element Empty Re: Identifying the element

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