royd
6 years agoRegular Contributor
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("*mockaroo.com*"); //error! ... }
I never had this problem before! Help is much appreciated.
Thanks
Dave
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.