Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago
Solved

check extension is installed on browser.

How can Check extension is installed on browsers or not by using script.
  • kaiiii's avatar
    kaiiii
    5 years ago

    Hi tristaanogre 

    Yes... I raised query for same and below is the reply.

    "The test failures I found are related to a SetUpBrowser function in your tests that closes an existing browser window before opening a new browser with OpenBrowserWithURL.
    When the new browser window is launched this way, it does not always contain the user profile information needed and causes the test to fail. I would recommend posting the URL to the existing browser window instead of opening a new browser to see if that produces more consistent results for your tests."

     

    And below is the function I am using.

     

    Sub SetUpBrowser
     While Sys.WaitBrowser().Exists
     Call Sys.WaitBrowser().Close()
     Wend
    End Sub

     

     

    Sub OpenBrowserWithURL (BrowserName,URL)
    Dim firefox,InternetExplorer,Chrome,Edge, Browser

    If (BrowserName="Firefox")Then
    Browsers.Item(firefox).Navigate(URL)
    Sys.Browser.BrowserWindow(0).Maximize
    ElseIf (BrowserName="InternetExplorer")Then
    Browsers.Item("iexplore", "11", Browsers.pX64).Run URL
    Sys.Browser.BrowserWindow(0).Maximize
    ElseIf (BrowserName="Edge")Then
    Browsers.Item(btEdge).Navigate(URL)
    Sys.Browser.BrowserWindow(0).Maximize
    ElseIf (BrowserName="Chrome")Then
    Browsers.Item(btChrome).Navigate(URL)
    Sys.Browser("chrome").BrowserWindow(0).Maximize
    End If

    Browser = Browsers.CurrentBrowser.Description
    Log.Checkpoint("Browser Details: " + Browser)
    Log.Checkpoint("URL: "&URL)

    Browsers.Refresh
    End Sub

     

    vinniew 

    Thanks for reply.

    Yes.. I am working on multiple instances(CBT).

    I have already gone through thelink provided by you but now I am looking to check extension status on browser.