-
Notifications
You must be signed in to change notification settings - Fork 23
/
usertesting.au3
26 lines (20 loc) · 1.18 KB
/
usertesting.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; The contents of this file are read & executed by the UserFile() function in wd_demo.au3
; Changes can be made to this file and quickly tested without having to exit or even close browser
ConsoleWrite("! Code now executing from usertesting.au3" & @CRLF)
ConsoleWrite("- Test 1:" & @CRLF)
_WD_NewTab($sSession, False, Default, "https://www.chrome.com", "noreferrer")
_WD_Attach($sSession, "Chrome")
_WD_LoadWait($sSession, 1000)
ConsoleWrite("- Test 2:" & @CRLF)
_WD_NewTab($sSession, True)
_WD_Navigate($sSession, 'https://www.google.com')
_WD_LoadWait($sSession)
MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONWARNING, "Warning #" & @ScriptLineNumber, "If you see COOKIE accept panel close them before you will continue.")
ConsoleWrite("- Test 3:" & @CRLF)
; REMARK: __SetVAR($IDX_VAR, $value) will set $_VAR[$IDX_VAR] = $value
__SetVAR(0, _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//textarea[@name='q']"))
ConsoleWrite("- Test 4:" & @CRLF)
_WD_ElementAction($sSession, $_VAR[0], "VALUE", 'AutoIt Forum')
ConsoleWrite("- Test 5:" & @CRLF)
_WD_WaitElement($sSession, $_WD_LOCATOR_ByCSSSelector, '#fake', 1000, 3000, $_WD_OPTION_NoMatch)
ConsoleWrite("! End of processing usertesting.au3" & @CRLF)