Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Identifying the element

View previous topic View next topic Go down

Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by Adviser on 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

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

it is an azax control

Post by bull on 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


bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by Adviser on 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

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by Adviser on 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.

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by kmahata@gmail.com on 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");

kmahata@gmail.com
Active particpant
Active particpant

Posts : 10
Join date : 2009-11-06

Back to top Go down

Re: Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by kmahata@gmail.com on Tue Dec 22, 2009 8:54 pm

Try css locator then :
css=.ricAppMenuHover

kmahata@gmail.com
Active particpant
Active particpant

Posts : 10
Join date : 2009-11-06

Back to top Go down

Re: Identifying the element

Post by bull on Tue Dec 22, 2009 8:55 pm

can you please how i can use in java code

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by kmahata@gmail.com on 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....

kmahata@gmail.com
Active particpant
Active particpant

Posts : 10
Join date : 2009-11-06

Back to top Go down

Re: Identifying the element

Post by bull on 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']");

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by bull on 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

bull
Active particpant
Active particpant

Posts : 10
Join date : 2009-12-18

Back to top Go down

Re: Identifying the element

Post by Sponsored content Today at 1:52 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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