Forum Discussion
nicktulett
12 years agoContributor
You can do it all with keystrokes (browser and document mode):
function IE9BrowserMode(versionNumber) {
Aliases.iexplore.Page("*").Keys("[F12]~b" + versionNumber + "~m" + versionNumber + "~[F4]");
}
function TESTIE9BrowserMode() {
IE9BrowserMode(8);
}
Note you don't need to sanitise the versionNumber as any wrong keystrokes will just be ignored.
The keystroke for IE10 will be "0" (zero). Let's hope there is no IE20.
function IE9BrowserMode(versionNumber) {
Aliases.iexplore.Page("*").Keys("[F12]~b" + versionNumber + "~m" + versionNumber + "~[F4]");
}
function TESTIE9BrowserMode() {
IE9BrowserMode(8);
}
Note you don't need to sanitise the versionNumber as any wrong keystrokes will just be ignored.
The keystroke for IE10 will be "0" (zero). Let's hope there is no IE20.
Related Content
- 11 years ago