Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Is it possible to use autoit to set a select when they have no id or name.

$
0
0

Is it possible to set a select when there is no name or id.. the only thing available is th class.. and I suppose I could figure out the index if that is the only way.. Would love to set it by class if possilbe some of what I have tried is shown here..

Thanks for any help..

#include <IE.au3> Local $oIE = _IEAttach("Wrappers") WinActivate("Wrappers") MsgBox(0, "","Select test-page-2 in 5 seconds.",5) Local $oInputs = _IETagNameGetCollection($oIE, "select") For $oInput In $oInputs if $oInput.class = "span4 categorySelect" then      select.option.value="52961"      ExitLoop EndIf Next ; <option value="52960">test-page-1</option> ; <option value="52961">test-page-2</option>

Below is what the html looks like:

 

<title>Wrappers</title>
<div class="row">
<div class="span4">

 

<select class="span4 categorySelect" data-categoryType="savedLink">
<option value="52960">test-page-1</option>
<option value="52961">test-page-2</option>
<option value="48010">virginia-beach-foreclosures</option>
</select>

 

</div>

 


 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>