0
我无法在iPhone 5s和6S +中进行鼠标和键盘操作。由于网站包含iFrames。如何处理iOS(移动设备)中的iframe?如何使用iOS webdriver处理iframe,我正在使用iPhone 5s&6S +?请在此帮助我
在此先感谢
我无法在iPhone 5s和6S +中进行鼠标和键盘操作。由于网站包含iFrames。如何处理iOS(移动设备)中的iframe?如何使用iOS webdriver处理iframe,我正在使用iPhone 5s&6S +?请在此帮助我
在此先感谢
如果iFrame中都存在,你需要得到他们的内部文件做鼠标和键盘操作。对于UIWebView或WKWebView,这意味着将2行添加到脚本的开头以插入到网页中。例如:
NSString *[email protected]"var iFrame=document.getElementById('idOfFrame'); \
var innerDoc=iFrame.innerDocument || iFrame.contentWindow.document; \
//Now do other things w/ innerDoc instead of document
";
现在,您将插入您的脚本。
[self.webView stringByEvaluatingJavaScriptFromString:scriptToInsert];
谢谢伊恩,我会检查你的代码... –