我想使用iMacros插件从firefox捕获iphone屏幕截图。用户代理似乎没有触发。
window.resizeTo(720,1280);
var mobile_title_screen_screenshot = 'SET !USERAGENT "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4"'+"\n";
mobile_title_screen_screenshot += "SAVEAS TYPE=PNG FOLDER=mobile FILE=mobile-screenshot.png";
iimPlayCode(mobile_title_screen_screenshot)
答案 0 :(得分:0)
我不完全确定,但您可以尝试触发“响应式设计视图”:
var mobile_title_screen_screenshot = 'SET !USERAGENT "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4"'+"\n";
mobile_title_screen_screenshot += 'EVENT TYPE=KEYPRESS SELECTOR=* CHAR="m" MODIFIERS="ctrl,shift"'+"\n";
mobile_title_screen_screenshot += "WAIT SECONDS=1"+"\n";
mobile_title_screen_screenshot += "SAVEAS TYPE=PNG FOLDER=mobile FILE=mobile-screenshot.png";
iimPlayCode(mobile_title_screen_screenshot);
答案 1 :(得分:0)
在指定用户代理后添加REFRESH
就可以了。