Selenium: How to set a test on a drop-down list?

In Spring, I generated a create.jspx form with some edit fields and some drop-down fields.
A form that cannot be tested in the Selenium IDE , but after recording a test case, the case will be played.

For example, the form:
Label1: [Sample text]
Label2: [Selected_item0]

The record of selenium will be:
click | Edit1_id |
type | Edit1_id |Sample text
click | Edit2_id_popup0

+3
source share
1 answer

It revealed:)

<tr>  
  <td>clickAt</td>  
  <td>//div[@id='widget__edit2_id']/div[1]/input</td>  
  <td>0,0</b>  
</td>  
</tr>  
<tr>  
  <td>waitForVisible</td>    
  <td>_edit2_id_popup1</td>  
  <td></td>  
</tr>
  <tr>  
  <td>mouseOver</td>    
  <td>_edit2_id_popup1</td>  
  <td></td>  
</tr>  
<tr>  
  <td>clickAt</td>  
  <td>_edit2_id_popup1</td>  
  <td>0,0</td>  
</tr>  
+1
source

Source: https://habr.com/ru/post/1772752/


All Articles