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
senthilm.aynara
Active particpant
Active particpant
Posts : 19
Join date : 2009-09-15

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

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
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

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

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
avatar
senthilm.aynara
Active particpant
Active particpant
Posts : 19
Join date : 2009-09-15

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

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
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

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

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
avatar
senthilm.aynara
Active particpant
Active particpant
Posts : 19
Join date : 2009-09-15

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

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)
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

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

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
Sponsored content

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

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