-
AutoIt
(
http://forum.oszone.net/forumdisplay.php?f=103)
Выбор элемента из перечня на веб странице(елемент select)
День добрый. Подскажите пожалуйста как можна выбрать отпереленный "option" в елементе "select" на веб странице???
Спасибо
|
Код:
; *******************************************************
; Example 1 - Open a browser with the form example, get reference to form, get reference
; to select element, cycle 10 times selecting options byValue, byText and byIndex
; Note: You will likely need to scroll down on the page to see the changes
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("form")
$oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
$oSelect = _IEFormElementGetObjByName ($oForm, "selectExample")
For $i = 1 To 10
_IEFormElementOptionSelect ($oSelect, "Freepage", 1, "byText")
Sleep(1000)
_IEFormElementOptionSelect ($oSelect, "midipage.html", 1, "byValue")
Sleep(1000)
_IEFormElementOptionSelect ($oSelect, 0, 1, "byIndex")
Sleep(1000)
Next
Функции _IE*, справка по UDF (находится в корне папки AutoIt).
Для других браузеров, другие UDF, примерно эти: Opera, FF.
И т.д., поиск по офф форуму.
|
Оо огромнейшее спасибо!!!! Очень благодарен!
|
Время: 23:17.
© OSzone.net 2001-