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
gaveyom
Amateur
Amateur
Posts : 38
Join date : 2011-07-13

how to select dropdown value Empty how to select dropdown value

Mon Nov 28, 2011 12:22 pm
Hi All,

how to select a value in drop down

below are the id and value of drop down
@id=drpyear
@value=2002-03

please let me know the correct syntax
avatar
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

how to select dropdown value Empty Re: how to select dropdown value

Mon Nov 28, 2011 3:40 pm
Code:
selenium.select('drpyear', 'value=2002-03');

I recommend reading the documentation Smile
avatar
gaveyom
Amateur
Amateur
Posts : 38
Join date : 2011-07-13

how to select dropdown value Empty Re: how to select dropdown value

Tue Nov 29, 2011 12:40 am
Hi faramka,

thank you for your reply, its working

when i try to get all the links under div tag

driver.findElements(By.xpath("//div[@id='divID']//a"));

it is working for one application same script im using for another application but it not working show below error, another application is also same as working application

the working application is prepared in .net and not working application is prepared in share point

************************************************************

Nov 29, 2011 4:37:07 AM org.apache.http.impl.client.DefaultRequestDirector execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond
Nov 29, 2011 4:37:07 AM org.apache.http.impl.client.DefaultRequestDirector execute
INFO: Retrying request
Exception in thread "main" org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:7055 refused
Build info: version: '2.0.0', revision: '12817', time: '2011-07-07 19:13:58'
System info: os.name: 'Windows NT (unknown)', os.arch: 'x86', os.version: '6.1', java.version: '1.5.0_05'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:399)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:201)
at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:267)
at org.openqa.selenium.By$ByXPath.findElements(By.java:318)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:178)
at Sample_Path.(Sample_Path.java:62)
at Sample_Path.main(Sample_Path.java:40)
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:7055 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:159)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:508)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:272)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:252)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:123)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:257)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:382)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.openqa.selenium.remote.ReusingSocketSocketFactory.connectSocket(ReusingSocketSocketFactory.java:122)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:133)
... 15 more

************************************************************

please let me know y this error is getting
Sponsored content

how to select dropdown value Empty Re: how to select dropdown value

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