user3054412
user3054412

Reputation: 37

WWW::Mechanize::Firefox select element with no name

how to select option element from select only with class using WWW::Mechanize::Firefox.

For example:

<select class="alabala">
<option value="a1">a1</option>
<option value="a2">a2</option>
<option value="a3">a3</option>
<option value="a4">a4</option>
<option value="a5">a5</option>
<option value="a6">a6</option>
</select>

How to select a2?

Thanks

Upvotes: 1

Views: 161

Answers (1)

AKHolland
AKHolland

Reputation: 4445

The same way you would set any other value in the form:

$mech->field(".alabala", "a2");

Upvotes: 1

Related Questions