Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internet explorer 在关闭的窗口上找不到元素-IE9_Internet Explorer_Selenium - Fatal编程技术网

Internet explorer 在关闭的窗口上找不到元素-IE9

Internet explorer 在关闭的窗口上找不到元素-IE9,internet-explorer,selenium,Internet Explorer,Selenium,我在我的网站上点击一个link(),它会打开另一个窗口。 问题是我在几秒钟前就做到了,一切都很好。但当打开此弹出窗口时,它会显示:“nosuchwindowexception无法在关闭的窗口中找到元素” 它发生在IE9上。 我已经尝试了在IE中找到的关于保护模式的所有内容(所有选项都已启用,我甚至尝试了所有选项都已禁用),以及禁用UAC。此外,我还尝试了driver.Switch()。。。和windows处理。。。我甚至试过等待的方法。 我相信我会得到专家们的解答。 提前谢谢 亚尼夫 编辑以在注

我在我的网站上点击一个link(),它会打开另一个窗口。 问题是我在几秒钟前就做到了,一切都很好。但当打开此弹出窗口时,它会显示:“nosuchwindowexception无法在关闭的窗口中找到元素” 它发生在IE9上。 我已经尝试了在IE中找到的关于保护模式的所有内容(所有选项都已启用,我甚至尝试了所有选项都已禁用),以及禁用UAC。此外,我还尝试了driver.Switch()。。。和windows处理。。。我甚至试过等待的方法。 我相信我会得到专家们的解答。 提前谢谢 亚尼夫

编辑以在注释中包含代码:

public void CreateNewApplicationForustomer() {
    System.Threading.Thread.Sleep(3000);
    webdriver.SwitchTo().Window("6c4d49a14b74e21187f5441ea175347c");
    System.Threading.Thread.Sleep(3000);
    CreateApplicationButton.Click();
    _webdriver.SwitchTo().DefaultContent();
    string a = _webdriver.CurrentWindowHandle.ToString();
    // _webdriver.SwitchTo().Frame("someframe");
    // System.Threading.Thread.Sleep(3000);
    // Subject.SendKeys("automation");
} 

你能附加一些代码吗?谢谢@Locke125 public void createnewapplicationforcustomer(){System.Threading.Thread.Sleep(3000);_webdriver.SwitchTo().Window(“6c4d49a14b74e21187f5441ea175347c”);System.Threading.Thread.Sleep(3000);CreateApplicationButton.Click();_webdriver.SwitchTo().DefaultContent();字符串a=_webdriver.CurrentWindowHandle.ToString();//_webdriver.Switch to().Frame(“someframe”);///System.Threading.Thread.Sleep(3000);///Subject.SendKeys(“自动化”);}