Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how to select dropdown value

View previous topic View next topic Go down

how to select dropdown value

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

gaveyom
Amateur
Amateur

Posts : 38
Join date : 2011-07-13

Back to top Go down

Re: how to select dropdown value

Post by faramka on Mon Nov 28, 2011 3:40 pm

Code:
selenium.select('drpyear', 'value=2002-03');

I recommend reading the documentation Smile

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: how to select dropdown value

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

gaveyom
Amateur
Amateur

Posts : 38
Join date : 2011-07-13

Back to top Go down

Re: how to select dropdown value

Post by Sponsored content


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