This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Retrieve username from windows login session | |
objUserName= CreateObject("WScript.Network").UserName | |
'Retrieve password from Environment variable 'AUTPwd' | |
objPassword= CreateObject("WScript.Shell").Environment("USER").Item("AUTPwd") | |
'Set the username on AUT | |
Browser("").Page("").WebEdit("username").Set objUserName | |
'Set the password on AUT | |
Browser("").Page("").WebEdit("password").SetSecure objPassword | |
'Click on login button | |
Browser("").Page("").WebButton("Login").Click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set wshShell = CreateObject( "WScript.Shell" ) | |
Set wshUserEnv = wshShell.Environment( "USER" ) | |
wshUserEnv("AUTPwd") = "**********" | |
Set wshUserEnv = Nothing | |
Set wshShell = Nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim objExcel | |
Dim objWorkBook | |
Dim objWorkSheet | |
Dim intRow | |
Dim intCol | |
Dim strPath : strPath ="D:\EmpData.xlsx" | |
'Create a new excel file under a given path | |
Set objExcel = CreateObject("Excel.Application") | |
Set objWorkBook = objExcel.Workbooks.Add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim objExConn | |
Dim objRecSet | |
Dim strPath | |
Dim strSQL | |
Dim strConnString | |
Dim intColCount | |
strPath = "D:\Datasheet.xlsx" | |
'Create an ADODB connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim dicStudentsList | |
Dim arrItems | |
Dim arrKeys | |
'Creating a dictionary object | |
Set dicStudentsList =CreateObject("Scripting.Dictionary") | |
'Adding Key-Item values to dictionary | |
dicStudentsList.Add "17861","Peter" | |
dicStudentsList.Add "17862","Bob" |