Selenium驱动程序在页面加载时无响应

时间:2018-06-07 09:08:42

标签: c# selenium selenium-webdriver selenium-chromedriver

我在c#中使用硒。我想访问网址列表并做一些事情。然而,一些网址的加载时间太长。 Selenium自动等待,直到加载完成,但是当页面加载时间过长时,我想停止进程并转到下一个URL,但是驱动程序完全没有响应,它甚至没有听到driver.quit ()。有没有办法在加载时控制驱动程序?

Using WSCS version: 0.3.0
libsodium not available! You can continue to use discordrb as normal but voice support won't work.
        Read https://github.com/meew0/discordrb/wiki/Installing-libsodium for more details.
Crash password: 6736731
[INFO : websocket @ 2018-06-07 19:04:57.517] Discord using gateway protocol version: 6, requested: 6
[ERROR : et-1 @ 2018-06-07 19:05:33.326] Exception: #<RuntimeError: Admin initiated crash.>
[ERROR : et-1 @ 2018-06-07 19:05:33.330] C:/Users/nathan/Desktop/Cyan_Phoenix local/bot.rb:19:in `block in <main>'
[ERROR : et-1 @ 2018-06-07 19:05:33.330] C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/events/generic.rb:98:in `call'
[ERROR : et-1 @ 2018-06-07 19:05:33.330] C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/discordrb-3.2.1/lib/discordrb/bot.rb:1227:in `block in call_event'

所以这段代码对我有用,但我遇到的问题是它没有启动driver.Quit()可能是因为它仍在等待页面加载结束。新的chromedriver虽然开始了。

0 个答案:

没有答案