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

not working when i click span without anchor tag in selenium

View previous topic View next topic Go down

not working when i click span without anchor tag in selenium RC

Post by senthilm.aynara on Thu Sep 17, 2009 5:59 pm

Hi all,
I am new to selenium. i want to automate my application. Here i have the following code

Code:

<ul>
<li id="720435377112" class="ag">
<span class="mb" title="Check" style="background-image: url(http://my_server//jpeg/SS);">
<img title="image" src="http://my_server//jpeg/SS" style="width: 30px; height: auto; visibility: visible;"/>
</span></li>
<li>......
</ul>
Here when i click image it goes to new screen with new layout. but not a new page using css. Here there is no anchor tag.
when record through selenium IDE i got script as like
selenium.click("//li[@id='720435377112']/span");
and i tried to execute in selenium RC - java client. it doesn't give any error. but click event is not performed in that image.
How can i solve this.

Thanks & Regards,
senthilm

senthilm.aynara
Active particpant
Active particpant

Posts : 19
Join date : 2009-09-15

Back to top Go down

Re: not working when i click span without anchor tag in selenium

Post by Adviser on Thu Sep 17, 2009 6:54 pm

hi,

Is this a list in which you are clicking? If yes, then try to use different command related to list.

if not, The id you are using is dynamic. try to use xpath generated from xpath or dom locator.

Lets try this and let me know will it work or not

bye

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

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

http://seleniumforum.forumotion.net

Back to top Go down

Re: not working when i click span without anchor tag in selenium

Post by senthilm.aynara on Fri Sep 18, 2009 11:30 am

Thank u for the reply. Yes it is span inside list. can u tell me different command related to list.
i tried in different ways..
http://selenium.click("//*[@id='720435377112']");
http://selenium.click("//ul[@id='idoflist']/li[1]/span[1]");
http://selenium.click("//li[@id='720435377112']/span");
selenium.fireEvent("//*[@id='720435377112']","click");
But not working.

Is it not correct?

Regards,
senthilm

senthilm.aynara
Active particpant
Active particpant

Posts : 19
Join date : 2009-09-15

Back to top Go down

Re: not working when i click span without anchor tag in selenium

Post by Adviser on Fri Sep 18, 2009 12:14 pm

hi,

Try this command for list selection:

|select | Locator | label=File# | // for IDE
selenium.select(lable=File#); // in rc.

Following are the commands for list define in selenium references Are:

storeSomethingSelected(selectLocator,variableName)
Determines whether some option in a drop-down menu is selected.

storeSelectOptions(selectLocator,variableName)

Gets all option labels in the specified select drop-down.


storeSelectedValues(selectLocator,variableName)
Gets all option values (value attributes) for selected options in the specified select or multi-select element.

storeSelectedLabels(selectLocator,variableName)
Gets all option labels (visible text) for selected options in the specified select or multi-select element.

storeSelectedIndexes(selectLocator,variableName)
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.


For all commands check out this link:
http://release.seleniumhq.org/selenium-core/0.8.0/reference.html

best of luck.

bye

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

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

http://seleniumforum.forumotion.net

Back to top Go down

Re: not working when i click span without anchor tag in selenium

Post by senthilm.aynara on Fri Sep 18, 2009 12:48 pm

FYI, List means not drop down. it is Unordered list (
Code:
<ul><li>--</li> </ul>
)

and in ur reply
selenium.select(lable=File#); // in rc.
here what is lable=File# in my case. I couldn't understand this.

Thanks
senthilm


Last edited by senthilm.aynara on Fri Sep 18, 2009 12:49 pm; edited 1 time in total (Reason for editing : for typing code)

senthilm.aynara
Active particpant
Active particpant

Posts : 19
Join date : 2009-09-15

Back to top Go down

Re: not working when i click span without anchor tag in selenium

Post by Adviser on Fri Sep 18, 2009 1:00 pm

hi,

whatever text option displaying which you are selected . If not text in coming, whatever value is coming in 'value ' option in IDE paced same as it's.

like: selenium.select("//[@id='720435377112']"); or
selenium.select("id='720435377112'");

Hope this will 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: not working when i click span without anchor tag in selenium

Post by Sponsored content Today at 8:09 am


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