Forum Discussion

royd's avatar
royd
Regular Contributor
6 years ago

JavaScript runtime error. TypeError: browser.Page is not a function

When I run the following, I get an error:   function myTest(){ Browsers.Item("iexplore").Run("https://www.mockaroo.com"); var browser = Browsers.Item("iexplore"); let page = browser.Page(...
  • tristaanogre's avatar
    tristaanogre
    6 years ago

    Ah, I see it... 

    Your browser variable is storing the browser item from the Browsers object... it's not actually referencing the running web browser because... you haven't actually run it yet.

     

    EDIT:
    Misspoke.  So,  you are running the browser.  What you need to do then is assign your variable to the running system process.

    let browser = Sys.Browser('iexplore')

     

    Then you can call the page object all you want.