Forum Discussion

blacy's avatar
blacy
Contributor
11 years ago

Warning Message using the If Browser statement

Getting below warning message using the If Browser statement: Anyone have any ideas of how I can fix?

 

"No browser is specified for he current test. Searching for a running browser"

 

Note: this test runs fine on TC 10.40. Only now getting the warning message using TC 10.60

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 3 rankChampion Level 3

    Hi,

     

    Assuming that you are using Aliases in your tests:

    If (Aliases.WaitAliasChild("browser", 500).Exists) Then

      ...

  • Basically all I did was drag the If Browser statement into my key-word test like below. I didn't use a Then Else statment

     

     If Browser Internet Explorer

         Object Checkpoint1

    If Browser FireFox 

         Object Checkpoint2

    If Browser Chrome

         Object Checkpoint3

    • AlexKaras's avatar
      AlexKaras
      Icon for Champion Level 3 rankChampion Level 3

      Hi,

       

      I am not sure if this works, but you may try to enclose all your If Browser operations with one more If...Then operation and set its condition elements to Code Expression with the following contants: Browsers.CurrentBrowser Does Not Equal Nothing.