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

Imported file with .xls file, still same syntax error occurs. Please review below updated script and see error screen shot from my previous post. Please do needful.

-------------
Code:
Datatable.Import"D:\Datasheet\book1.xls"

For i=1 to DataTable.RowCount
    SystemUtil.run DataTable(“URL”,dtGlobalSheet)
    Browser(“InSync :: Login”).Page(“InSync :: Login”).Webedit().Set DataTable(“Username”,dtGlobalSheet)
    Browser(“InSync :: Login”).Page(“InSync :: Login”).Webedit().Set DataTable(“Password”,dtGlobalSheet)
              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
-----

Thanks,
Mansi.
Reply
#12
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
I used the below code and it works fine for me:

Code:
DataTable.Import("D:\Book1.xls")
DataTable.SetCurrentRow 1
SystemUtil.Run DataTable("URL",dtGlobalSheet)

Just make sure u passed the URL of application in datasheet

Regards,
Sankalp
Reply
#13
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Sankalp,

Thanks for helping me in solving described error. But now new error occurs (refer attachment). Please review below script-

-----------
Code:
DataTable.Import("D:\Book1.xls")
DataTable.SetCurrentRow 1

For i=1 to DataTable.RowCount
SystemUtil.Run DataTable("URL",dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtUsername").Set DataTable(“Username”,dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set DataTable(“Password”,dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click

'Select facility'
Browser("InSync :: Login").Page("InSync :: Login_2").WebList("ddlFacility").Select ("Local Facility")
Browser("InSync :: Login").Page("InSync :: Login_2").WebButton("Ok").Click

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

----

Thanks
Mansi.


Attached Files Image(s)
   
Reply
#14
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
Have u put the datasheet at D drive?

Regards,
Sankalp
Reply
#15
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Yes, It is in D drive and it is fetching URL correctly.. But error occurs for username and password.. Please review my script and error screen from previous post..
Reply
#16
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Please help me urgently on mentioned issue.

Thanks,
Mansi.
Reply
#17
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
Could you please provide the datasheet snapshot?

Regards,
Sankalp
Reply
#18
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Please review attached datasheet snapshot..

Thanks,
Mansi.


Help me plssss.........

Thanks,
Mansi.


Attached Files Image(s)
   
Reply
#19
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
Try to use below code

Code:
DataTable.Import("D:\Book1.xls")


For i=1 to DataTable.RowCount
[color=#FF0000]DataTable.SetCurrentRow i[/color]
SystemUtil.Run DataTable("URL",dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtUsername").Set DataTable(“Username”,dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set DataTable(“Password”,dtGlobalSheet)
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click

'Select facility'
Browser("InSync :: Login").Page("InSync :: Login_2").WebList("ddlFacility").Select ("Local Facility")
Browser("InSync :: Login").Page("InSync :: Login_2").WebButton("Ok").Click

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

Regards,
Sankalp
Reply
#20
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

Not working.. again same error occurs.. Now I am hopeless. can you help me by using goto meeting??

Thanks,
Mansi.
Reply


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,980 09-21-2012, 12:42 PM
Last Post: mansis
  Multiple users executing QTP script using Excel Input vinodindia 0 3,217 07-05-2012, 11:41 PM
Last Post: vinodindia
  Switching between URLs sqadri 1 2,747 02-01-2012, 07:36 AM
Last Post: rajpes
  Multiple input values from a reusable action call from main script knightofdawn 0 3,344 08-30-2010, 01:23 PM
Last Post: knightofdawn
Exclamation How to access multiple SAP sessions by script? Osprey 1 7,911 06-24-2010, 04:11 PM
Last Post: Osprey

Forum Jump:


Users browsing this thread: 1 Guest(s)