【发布时间】:2016-04-26 06:46:40
【问题描述】:
如何使用 google chrome for mobile 网站运行我的 selenium 'webdriver',却没有任何线索来运行我的脚本,
我有类似 firefox 的用户代理,并且可以在 firefox for mobile 网站中轻松运行我的测试用例
FirefoxProfile ffProfile = new FirefoxProfile();
ffProfile.addExtension(new File(CONFIG.getProperty("agentswitcher")));
String samsung3 = "Mozilla/5.0 (Linux; U; Android 4.0.3; de-de; Galaxy S II Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
ffProfile.setPreference("general.useragent.override", samsung3);
这里的代理切换器是user_agent_switcher-0.7.3-fx+sm.xpi文件从网上下载
【问题讨论】:
标签: google-chrome selenium webdriver