0
我試圖等待一個框架,然後再繼續加載...等待幀在IE10硒的webdriver IJAVASCRIPTEXECUTER C#加載
在C#中使用IJavaScriptExecuter
string returnIframeLoad = @"function(){ if(iframe.load){return true;}}";
IList<IWebElement> Frames = driver.FindElements(By.TagName("iframe"));
for (int i = 0; i < Frames.Count; i++)
{
wait.Until<bool>((d) =>
{
try
{
return (bool)((IJavaScriptExecutor)driver).ExecuteScript(returnIframeLoad);
}
catch
{
return false;
}
});
}
親切指導我