Reputation: 849
I'm trying to automate a certain web page that has dropdown lists and I'm facing issue with one of the dropdown list.
Robot script:
Input Text //*[@id="description"] Test Attribute Robot
Click Element //*[@id="short_description"]
Select From List By Label //*[@id="entity_id"] Location
Select From List By Label //*[@id="format_id"] Value List
Select From List By Label //*[@id="status_id"] Active
HTML:
<select nextfocus="" enterindex="2" select-dropdown="" name="entity_id" id="entity_id" ng-options="entity.id as entity.entity for entity in attributeCtrl.Entities" ng-model="attributeCtrl.Attribute.entity_id" class="form-control select-component input-sm ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-valdr-required ng-valid-valdr-digits ng-invalid-valdr ng-invalid-required" required=""><option value="" disabled="" class="" selected="selected">Select Entity</option>
<option label="Location" value="number:1">Location</option>
<option label="Item" value="number:7">Item</option>
<option label="Vendor" value="number:23">Vendor</option>
<option label="Made To Orders" value="number:314">Made To Orders</option></select>
<select nextfocus="" enterindex="3" name="status_id" id="status_id" ng-options="status.code as status.description for status in attributeCtrl.Status" ng-model="attributeCtrl.Attribute.status_id" class="form-control select-component input-sm ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-valdr-required ng-valid-valdr-digits ng-invalid-valdr ng-invalid-required" required="">
<option value="" disabled="" class="" selected="selected">Select Status</option>
<option label="Pending" value="number:100">Pending</option>
<option label="Active" value="number:200">Active</option>
<option label="Inactive" value="number:300">Inactive</option>
<option label="Discontinued" value="number:400">Discontinued</option></select>
The issue is with the last dropdown list. It throws an error
ElementNotVisibleException: Message: element not visible: Element is not currently visible and may not be manipulated.
However, the other dropdowns get selected successfully.
Also, if the id of the element is changed to "statusId" instead of "status_id" it works fine.
I've tried "Select From List By Value" keyword as well but that results in the same error.
What could be the issue here?
Upvotes: 3
Views: 1996
Reputation: 43
Try with:
Set Focus To Element //*[@id="status_id"]
Select From List By Label //*[@id="status_id"] Active
Upvotes: 0