Skip to content

Commit 1c59c19

Browse files
committed
Updated examples and templates
1 parent 8d7fd3a commit 1c59c19

19 files changed

Lines changed: 172 additions & 223 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
References
22
bin
33
obj
4+
Xlbin
45
*.exe
56
*.log
67
*.bak
78
*.user
89
*.lnk
910
*.pyc
10-
*.user
11+
*.user
12+
*.xlt
13+
*.xls
Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
; AutoIt script example
1+
; AutoIt script example with Selenium
22
; https://www.autoitscript.com
33
;
44

5+
Func Main()
6+
; Launch the browser and open an URL
7+
Dim $driver = ObjCreate("Selenium.FirefoxDriver")
8+
$driver.Get("https://en.wikipedia.org/wiki/Main_Page")
59

6-
; Launch the browser and open an URL
7-
Local $driver = ObjCreate("Selenium.FirefoxDriver")
8-
$driver.Get("https://en.wikipedia.org/wiki/Main_Page")
10+
; List all links, remove duplicates and sort them
11+
Dim $links = $driver.FindElementsByCss("a").Attribute("href")
12+
$links.Distinct
13+
$links.Sort
14+
15+
; Launch Excel and create a Workbook
16+
Dim $excel = ObjCreate("Excel.Application")
17+
$excel.WorkBooks.Add ; Add a new workbook
18+
$excel.Visible = 1 ; Let Excel show itself
19+
20+
; Write the links in Excel and quit
21+
$links.ToExcel($excel.ActiveSheet, "Links")
22+
$driver.Quit
23+
EndFunc
24+
25+
Main()
926

10-
; List all links, remove duplicates and sort them
11-
Local $links = $driver.FindElementsByCss("a").Attribute("href")
12-
$links.Distinct
13-
$links.Sort
1427

15-
; Launch Excel and create a Workbook
16-
Local $excel = ObjCreate("Excel.Application")
17-
$excel.WorkBooks.Add ; Add a new workbook
18-
$excel.Visible = 1 ; Let Excel show itself
1928

20-
; Write the links in Excel and quit
21-
$links.ToExcel($excel.ActiveWorkBook.ActiveSheet, "Links")
22-
$driver.Quit
2329

2430

-69 Bytes
Binary file not shown.

Examples/Excel/CloudSauceLab.xlsm

-2 Bytes
Binary file not shown.

Examples/Excel/Examples.xlsm

46 KB
Binary file not shown.
28.4 KB
Binary file not shown.

Examples/Excel/Selenium.xls

-80 KB
Binary file not shown.

Examples/Excel/Selenium.xlsm

-45.9 KB
Binary file not shown.
-32.8 KB
Binary file not shown.

Examples/Excel/UIAutomation.xlsm

-18.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)