简体   繁体   English

如何使用AutoIt设置Internet Explorer选项?

[英]How to use AutoIt to set Internet Explorer options?

I need to use AutoIt to change the emulation mode in Internet Explorer. 我需要使用AutoIt来更改Internet Explorer中的模拟模式。

Basically I need to open the "developer tools" (F12), change the document mode to emulate IE 10. 基本上我需要打开“开发人员工具”(F12),更改文档模式以模拟IE 10。

AutoIt is up and running in my IDE (Eclipse). AutoIt在我的IDE(Eclipse)中启动并运行。 I already can open IE, what are my doubts: 我已经可以打开IE,我有什么疑问:

  1. How can I simulate opening the debug options? 如何模拟打开调试选项?

在此输入图像描述

  1. How can I change the emulation version? 如何更改仿真版本?

在此输入图像描述

I just created a new instance of AutoIt and know how to open IE: 我刚刚创建了一个新的AutoIt实例,并知道如何打开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: 我用键击来做到这一点:

x.send("{F12}") //go to developer mode
x.send("^8") //control-8 to go to Emulation tab
x.send("{TAB}") //select the first field (Document mode)
x.send("10") //set emulated version to E10

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 ). 我手动检查,这适用于资源管理器11.虽然更改不是很持久,但请注意浏览器历史记录重置等( 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/functions/Send.htm
https://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm https://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Selenium:在Internet Explorer中将文件下载到指定的文件夹,而无需直接链接,没有Windows窗体,没有AutoIt或Robot - Selenium: download file in Internet Explorer to specified folder without direct link, without Windows Forms, without AutoIt or Robot 硒2:无法为Internet Explorer设置代理 - Selenium 2: Unable to set PROXY for Internet Explorer javascript弃用了所需功能。 我们如何使用Internet Explorer驱动程序Selenium中启用的Java脚本 - Desired capabilities isjavascriptenabled deprecated. How can we use the java script enabled in Internet explorer driver selenium Set-Cookie标头不在Internet Explorer中设置cookie - Set-Cookie header does not set cookie in Internet Explorer 如果我想使用 autoit 如何在 maven 项目中使用 - If I want to use autoit how can I use in maven project 如何在Internet Explorer选项卡中打开SWT浏览器? - How to open SWT Browser in Internet Explorer tab? 如何在Java中调整Internet Explorer浏览器的大小 - How to resize Internet Explorer browser in Java Internet Explorer如何检测jre? - How does Internet Explorer detect jre? GWT 2.6.0如何启用Internet Explorer 6/7排列 - GWT 2.6.0 how to enable Internet Explorer 6/7 permutation 使用RequestHeaderAuthenticationFilter时如何测试Internet Explorer? - How to test Internet Explorer when using RequestHeaderAuthenticationFilter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM