0

I can't be able to select values from the dropdown in selenium webdriver. I tried all the ways using name and xpath selectors. Please help.

The code is:

<span id="cboEmploymentTypeId" class="select" tabindex="0" name="cboEmploymentTypeId" unselectable="on" style="-moz-user-select: none; box-shadow: none;">
Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
user123
  • 27
  • 8
  • Is your listbox is associated with
  • ??? Check below video may help. https://www.youtube.com/watch?v=DfYj3DYnN0c
  • – Uday Mar 09 '15 at 07:06
  • Yes associated with – user123 Mar 09 '15 at 07:19
  • Then watch the video, it will help. – Uday Mar 09 '15 at 07:20
  • -- Välj jobbtyp -- Fast anställd Egen företagare ..... – user123 Mar 10 '15 at 02:31
  • The code is shown in above – user123 Mar 10 '15 at 02:31
  • new Select(driver.findElement(By.name("cboEmploymentTypeId"))).selectByVisibleText("Fast anställd"); But its not working. – user123 Mar 10 '15 at 02:34