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


Unable to select Box using selenium2.0

View previous topic View next topic Go down

Unable to select Box using selenium2.0

Post by on Tue Jan 28, 2014 9:57 am


I am newbie to selenium.
I was trying to select a value from the select box in
i am using firefox 12.0 and eclipse ... In this site, for religion select box, when i try to select " Hindu" by using this sentence 


it is selecting a different option .

Also, i selected RELIGION and Mother Tongue using these statements (these two work fine using these statements)

WebDriver  wd=new FirefoxDriver();


Select dropdow=new Select(wd.findElement(By.xpath(".//*[@id='REGISTERED_BY']")));

Select dropdown = new Select(wd.findElement(By.xpath(".//*[@id='RELIGION']")));

Select dropdown1=new Select(wd.findElement(By.xpath(".//*[@id='MOTHERTONGUE']")));

After this , the caste comes ......
 Select dropdown2=new Select(wd.findElement(By.xpath("//*[@id='TEMP_CASTE_NORMAL']")));

This is giving some error ..........

Exception in thread "main" Element should have been "select" but was "input"
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'admin-HP', ip: '', 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_21'
Driver info: driver.version: unknown
at Pack1.matri.main(

What is the wrong i did ???? (OR) what is the xpath to be written to select CASTE ??????


Posts : 1
Join date : 2014-01-28

Back to top Go down

Re: Unable to select Box using selenium2.0

Post by nabhanya.varma on Tue Dec 16, 2014 12:27 am

You need to check the tags that are used. 

You can visit the below site for more information on Select Working with Select

Active particpant
Active particpant

Posts : 13
Join date : 2014-03-02

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