Использую UIAutomate
http://autoit-script.ru/index.php?topic=16780.165
форма заказа https://www.supremenewyork.com/checkout
предварительно нужно на сайте выбрать что нибудь для покупки, например
http://www.supremenewyork.com/shop/shirts/s98ua6r1x
Не получается кликнуть на поле Full name
Информация из Inspect
ошибок никаких не получаю - но курсор не перемещается
http://autoit-script.ru/index.php?topic=16780.165
форма заказа https://www.supremenewyork.com/checkout
предварительно нужно на сайте выбрать что нибудь для покупки, например
http://www.supremenewyork.com/shop/shirts/s98ua6r1x
Код:
#include <UIAutomate.au3> ; Смотри: http://autoit-script.ru/index.php?topic=16780.0
Opt("WinTitleMatchMode", 2)
; Запуск Chrome с параметром --force-renderer-accessibility
; При отсутствии этого параметра доступ к элементам страницы будет запрещён
$hWnd = GetPage()
If Not $hWnd Then Exit
$searchString="Supreme"
;only open new 'Supreme' tab if there's no active one
If StringInStr(WinGetTitle("[ACTIVE]"), $searchString) = 0 Then
; Создание элемента с использованием дескриптора окна
$oParent = _UIA_GetElementFromHandle($hWnd)
; Поиск строки адреса и клик по ней
$oElement = _UIA_GetControlTypeElement($oParent, "UIA_EditControlTypeId", "Адресная строка и строка поиска")
_UIA_ElementMouseClick($oElement)
sleep(100)
; Переход на сайт
Send("https://www.supremenewyork.com/checkout",1)
Send("{ENTER}")
$oElement = _UIA_GetControlTypeElement($oParent, "UIA_EditControlTypeId", "order_billing_name")
_UIA_ElementMouseClick($oElement)
endif
sleep(100)
Func GetPage()
$title='[TITLE:Supreme - Google Chrome]'
if WinExists($title) then
WinActivate($title)
Else
Run(@ProgramFilesDir & "\Google\Chrome\Application\chrome.exe --force-renderer-accessibility")
endif
$hWnd = WinWait(" - Google Chrome", "", 3)
Return $hWnd
EndFunc
Не получается кликнуть на поле Full name
Информация из Inspect
Код:
<div class="input string required"><label class="string required control-label" for="order_billing_name">full name</label><input class="string required" first_and_last="true" id="order_billing_name" name="order[billing_name]" required="required" size="50" type="text"></div>