Browser("Siebel Energy (CMS DR)").Page("Siebel Energy (CMS DR)").WebEdit("_SweUserName").Set "karen_lai" Browser("Siebel Energy (CMS DR)").Page("Siebel Energy (CMS DR)").WebEdit("_SwePassword").SetSecure "4ac2f0721de38693ec822d2d5223ffb8a8d7dbd9d39e4fc590baef0b" Browser("Siebel Energy (CMS DR)").Page("Siebel Energy (CMS DR)").WebEdit("_SwePassword").Submit SiebApplication("Siebel Energy (CMS DR)").SiebPageTabs("PageTabs").GotoScreen "Agreement Screen" SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Agreements").SiebButton("New").Click FUNCTION GetRandomString(LEN) Dim intI, StrS Const StartChr ="0", Range = 9 Randomize StrS = "" FOR intI = 0 TO LEN-1 StrS = StrS + Chr(asc(StartChr) + Rnd() * Range ) NEXT GetRandomString = StrS END FUNCTION Dim StrE StrE = GetRandomString(7) SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Agreement").SiebText("Agreement No").SetText StrE SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Agreement").SiebText("Account Name").OpenPopup SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Add Accounts").SiebButton("Query").Click SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Add Accounts").SiebList("List").SiebText("Account Number").SetText "0002850020 " SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Add Accounts").SiebButton("Go").Click SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Accounts").SiebButton("Add >").Click SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("All Agreements Across").SiebApplet("Accounts").SiebButton("OK").Click SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebScreenViews("ScreenViews").Goto "CUT Agreement Accounts View","L3" SiebApplication("Siebel Energy (CMS DR)").SiebScreen("Agreement").SiebView("Agreement Accounts").SiebApplet("Installed Appliances").SiebButton("Copy Assets to Line Items").Click Browser("Siebel Energy (CMS DR)_2").Dialog("Microsoft Internet Explorer_2").WinButton("OK").Click SiebApplication("Siebel Energy (CMS DR)").ProcessKeyboardAccelerator "Ctrl+S" SiebApplication("Siebel Energy (CMS DR)").SiebMenu("Menu").Select "File\\File - Logout"