Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running QTP Scripts on multiple SAP Test Environments
#5
Solved: 11 Years, 4 Months ago
A good way to not have problems with opened browsers, you can use Browser().Close method at the end of each test (or within the last action, last step), or you can write a function as next and use it where you'll need it:

Code:
[b]Public Function[/b] CloseBrowser
    Reporter.[b]Filter[/b] = rfDisableAll
[color=#808000]'closing the browser[/color]
        [b]If[/b] Browser([color=#FF6347]"URL:=http://environment1/.*"[/color]).Exist [b]Then[/b]
            Browser([color=#FF6347]"URL:=http://environment1/.*"[/color]).[b]Close[/b]
        [b]End IF[/b]

        [b]If[/b] Browser([color=#FF6347]"URL:=environment2/.*"[/color]).Exist [b]Then[/b]
            Browser([color=#FF6347]"URL:=environment2/.*"[/color]).[b]Close[/b]
        [b]End IF[/b]
    Reporter.[b]Filter[/b] = rfEnableAll
End Function

to call this function from the *.qfl file, use in you test next:
CloseBrowser 'that's it

it's working very good in all my tests..
Reply


Messages In This Thread
RE: Running QTP Scripts on multiple SAP Test Environments - by lotos - 08-02-2010, 07:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,341 01-03-2020, 09:30 PM
Last Post: Bhuvana
  issue with IE when running test eiko 2 1,582 02-01-2018, 04:46 PM
Last Post: eiko
  Issue in running Scripts on Edge browser Deepa_m 0 1,642 12-01-2017, 04:36 PM
Last Post: Deepa_m
  "How to automate SAP Applications using QTP" suresz449 9 23,159 09-01-2017, 12:42 PM
Last Post: Shiva Kumar
  Search All Test scripts For a Function? AndyBSG 1 2,735 02-19-2015, 04:15 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 4 Guest(s)