E
E
Emil Revencu2016-03-08 01:50:30
Python
Emil Revencu, 2016-03-08 01:50:30

How to select by OPTION index using GRAB module?

Python 2.7.11, module GRAB
There is a form with a select:

<select name="myselect">
<option value="dynamic">test1</option>
<option value="dynamic">test2</option>
<option value="dynamic">test3</option>
<option value="dynamic">test4</option>
</select>

How to select OPTION by index?
g.doc.set_input('myselect','3')
This function only works with OPTION VALUE, and my value will be dynamic (depends on the request - changes)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Emil Revencu, 2016-03-08
@Revencu

Found a solution through XPATH:
first we look for the value:
Well and then we select in the form:
The question is removed. Thanks to all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question