Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use same script for multiple URLs
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Please try below code

Code:
Set ObjExcel = CreateObject("Excel.Application")
ObjExcel.Visible = TRUE


Set oWorkbook = ObjExcel.Workbooks.Open "C:\Documents and Settings\mansi.shah\Desktop\book1.xlsx"
Set oWorksheet = oWorkbook.Worksheets("Sheet1")
rCnt = oWorkbook.Worksheets("Sheet1").UsedRange.Rows.Count

For i=2 to rCnt
URL = oWorkbook.Worksheets("Sheet1").Cells(i,1).Value
UserName = oWorkbook.Worksheets("Sheet1").Cells(i,2).Value
Password  = oWorkbook.Worksheets("Sheet1").Cells(i,3).Value
    System Util.run URL
    Browser().Page().Webedit().Set UserName
    Browser().Page().Webedit().Set Password
    Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click
'Select facility'
Browser("InSync :: Login").Page("InSync :: Login_2").WebButton("Ok").Click

'Open Scheduler page'

Browser("InSync :: Login").Page("InSync :: Dash Board").Image("ctl00$Header1$Image2").Click
Wait (3)

'Access Patient Search page'

Browser("InSync :: Login").Page("InSync :: Dash Board_2").Image("ctl00$Header1$Image3").Click
Browser("InSync :: Login").Page("InSync :: Patient Search").Image("Edit Patient").Click
Wait (3)


''Access Facesheet'
Browser("InSync :: Login").Page("InSync :: Patient Search").Image("ctl00$Header1$Image4").Click
Wait (3)

'Access New charge page'
Browser("InSync :: Login").Page("InSync :: Dash Board_2").Image("ctl00$Header1$Image5").Click

'Access Document Manager'
Browser("InSync :: Login").Page("InSync :: Dash Board_2").Image("ctl00$Header1$ibtndocumnetmgr").Click
Wait (3)

Browser("InSync :: Login").Close
Next
Reply


Messages In This Thread
RE: How to use same script for multiple URLs - by ssvali - 08-29-2012, 04:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run same script for different URLs when loading time is different mansis 5 4,966 09-21-2012, 12:42 PM
Last Post: mansis
  Multiple users executing QTP script using Excel Input vinodindia 0 3,207 07-05-2012, 11:41 PM
Last Post: vinodindia
  Switching between URLs sqadri 1 2,729 02-01-2012, 07:36 AM
Last Post: rajpes
  Multiple input values from a reusable action call from main script knightofdawn 0 3,335 08-30-2010, 01:23 PM
Last Post: knightofdawn
Exclamation How to access multiple SAP sessions by script? Osprey 1 7,896 06-24-2010, 04:11 PM
Last Post: Osprey

Forum Jump:


Users browsing this thread: 4 Guest(s)