View get_an_attachment_file_by_sysid.ps1
# https://arm-lab.blogspot.com/2021/03/servicenowpowershell.html | |
# Parameters | |
$user = "admin" | |
$pass = "admin" | |
$instansname = "dev00000" | |
$SysID = "8180046a2fba601033e449e72799b680" | |
$BasePath = "C:\" | |
# Build auth header | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user, $pass))) |
View import_table_by_xls-xlsx.ps1
# Params @ Local | |
$XLSXFileName = "xxxx.xls/xlsx" | |
$XLSXFilePath = "C:\" | |
# Params @ SNOW | |
$InstanceName = "dev00000" | |
$User = "admin" | |
$Pass = "admin" | |
$ImportTableName = 'u_inport_incident_by_xls/xlsx' |
View import_table_by_csv.ps1
# Params @ Local | |
$CSVFileName = "xxxx.csv" | |
$CSVFilePath = "C:\" | |
# Params @ SNOW | |
$InstanceName = "dev00000" | |
$User = "admin" | |
$Pass = "admin" | |
$ImportTableName = 'u_inport_incident_by_csv' |
View export_table_with_all_column.ps1
# Parameters | |
# Example | |
# $user = "admin" | |
# $pass = "admin" | |
# $instansname = "dev00000" | |
# $targettablename = "incident" | |
# $baselocalpath = "C:\snowapi\" | |
# $outfilename = "incident.xls" | |
$user = "admin" | |
$pass = "admin" |
View SpecifyTheDragAndDropPointByScreenRatio.script
drag (remotescreensize().x*0.5,remotescreensize().y-1) | |
wait 1 | |
moveto (remotescreensize()*0.5) | |
wait 1 | |
drag (remotescreensize().x,remotescreensize().y*0.5) | |
drop | |
wait 10 | |
typetext homebutton |
View Proc_L1ConnectionController.py
import cloudshell.helpers.scripts.cloudshell_scripts_helpers as helpers | |
# How to use this file | |
# | |
# from Proc_L1ConnectionController import L1ConnectionController | |
# L1CC = L1ConnectionController() | |
# L1CC.ChangeStateOfAllL1Routes("Connect") | |
class L1ConnectionController: | |
def __init__(self): | |
self.reservation_id = helpers.get_reservation_context_details().id | |
self.session = helpers.get_api_session() |
View CaptureAndCompareTwoImages.script
set CaptureArea to (0, 0, 100, 100) -- Set Capture Area. | |
CaptureScreen "C:\Users\[UserName]\Image-Before.png", CaptureArea | |
//Your Actions | |
CaptureScreen "C:\Users\[UserName]\Image-After.png", CaptureArea | |
if file "C:\Users\[UserName]\Image-Before.png" as data is equal to file "C:\Users\[UserName]\Image-After.png" as data then | |
log "Image-Before and Image-After are same images." |
View UseUserInputData.script
ask "Enter your name:" | |
log it |
View UseGherkinSample.script
(* add to file of "UseGherkinSample.feature" *) | |
//Feature: Get Screen Capture | |
// Scenario: Get Screen Capture | |
// Given connect "localhost" | |
// When get screenshot | |
// Then disconnect "localhost" | |
(* UseGherkinSample.script *) | |
to handle connect_STR | |
params str1 |
View ReadTheMatrix.script
Put Imagelocation("X-ImageName").x into LocationX | |
Put Imagelocation("Y-ImageName").y into LocationY | |
Log ReadText(LocationX, LocationY) |
NewerOlder