1
votes

am new to selenium and while recording in selenium IDE it is not recording drop - down list am posting html code of it.

If the IDE is not recording the event, issue such as the element being defined as hidden.

Thanks for your help :)

<input type="hidden" name="roleSpecification.industries.id" value="" />
<select name="roleSpecification.industries.id" size="3" data-placeholder="Any"   class="test chzn-select" multiple="multiple" id="roleSpecification_industries_id" >
<option value="1">Accounting</option>
<option value="2">Architecture &amp; Planning</option>
<option value="3">Arts</option>
</select>
1
you can use Firebug and find the id or xpath or css of the drop down box and use it for selecting the desired value. Let me know if you need more help. - Hemanth
Thanks for your help css=input.select2-input.select2-focused ; xpath=(//input[@type='text'])[3] ; id = roleSpecification_industries_id ; i tried using each of them but no joy command = click; Target - id=roleSpecification_industries_id ; value - label = Accounting - Venkatesh

1 Answers

0
votes

From Selenium Reference.

storeVisible ( locator, variableName )

Determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.

Arguments:

  • locator - an element locator

  • variableName - the name of a variable in which the result is to be stored.

Returns:

true if the specified element is visible, false otherwise

Related Assertions, automatically generated:

  • assertVisible ( locator )
  • assertNotVisible ( locator )
  • verifyVisible (locator )
  • verifyNotVisible ( locator )
  • waitForVisible ( locator )
  • waitForNotVisible ( locator )

You can use verifyVisible(css=input[name="roleSpecification.industries.id"])