Protractor: How To Access Global Variables That We Have Inside Our Application?
Hope if someone could help. I am working on an Angular based application. I am automating my End to End tests with the help of Protractor. I have a global variable set in my Applic
Solution 1:
If I understand correctly, your variable is a global inside your website, i.e. it's on window
. Generally, your end to end tests should avoid accessing variables directly in your site's code, but if you have to do this you can do:
browser.executeScript('return window.selectedPlatform')
Post a Comment for "Protractor: How To Access Global Variables That We Have Inside Our Application?"