I need to use AutoIt to change the emulation mode in Internet Explorer.
Basically I need to open the "developer tools" (F12), change the document mode to emulate IE 10.
AutoIt is up and running in my IDE (Eclipse). I already can open IE, what are my doubts:
- How can I simulate opening the debug options?
- How can I change the emulation version?
I just created a new instance of AutoIt and know how to open IE:
package autotioficial;
import java.io.File;
import com.jacob.com.LibraryLoader;
import autoitx4java.AutoItX;
public class App {
public static void main(String[] args) {
File file = new File("lib", "jacob-1.18-x86.dll"); //path to the jacob dll
System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());
AutoItX x = new AutoItX();
x.run("C:/Program Files (x86)/Internet Explorer/iexplore.exe");
}
}
I'd use keystrokes to do this:
I checked manually, this works on Explorer 11. The change is not very persistent though, watch for browser history resets etc (http://appliedusers.ca/forums/index.php?topic=5330.0).
References:
https://www.autoitscript.com/autoit3/docs/functions/Send.htm
https://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm