1.org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
问题原因:URL不够完整 或者格式错误
问题解决:URL必须完整,比如driver.get("https://www.baidu.com");
2.org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('没有更多文件。') for URL 'http://localhost:40125/' (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 24.60 seconds
问题原因:启动浏览器时,启动了其他浏览器
问题解决:配置启动浏览器的属性,重新run,跳转正确的浏览器就不会报该错误
本文解析了Selenium WebDriver中两种常见异常:f.QueryInterfaceisnotafunction及SessionNotFoundException,并提供了具体的解决方案,帮助读者解决启动浏览器时遇到的问题。
600

被折叠的 条评论
为什么被折叠?



