立即窗口不执行 selenium webdriver 代码
在VS2019和VS2022中均已验证。
我刚刚开始注意到我无法再在即时窗口中执行Selenium Webdriver代码。
以前,我知道我能够在直接窗口中执行不同的驱动程序操作,但是现在我收到以下消息:
最近有什么变化导致了硒?我已经完成了使用手表窗口执行评估的事情,如果我想评估调试器的特定代码线,我想可以有效。
我喜欢的窗口最喜欢的一件很棒的事情是能够输入代码,即使我需要进行测试,甚至还没有在我的程序中进行一些测试。这对于编写测试自动化无关紧要,因此每次尝试尝试新代码时,我都不必停止并开始调试过程。
Verified in both VS2019 and VS2022.
I just recently started noticing that I wasn't able to execute selenium webdriver code in the immediate window anymore.
Before, I know for a fact I was able to perform different driver actions in the immediate window but now I'm just getting the following message:
Did something change recently that's causing this with selenium? I've done the thing where I use the Watch window to perform the evaluation and I guess that works OK if I'm wanting to evaluate the specific line of code the debugger is on.
One of the great things I loved about the immediate window was being able to type in code that wasn't even in my program to do some testing if I needed to. That's immeasurably helpful with writing test automation so I don't have to stop and start my debug process every time I want to try out a new piece of code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以肯定的是,我想出了原因。带有 selenium.webdriver Nuget软件包带有4.0+版本的东西会导致它。我必须做更多的挖掘才能找出为什么 tho。
我测试了将软件包版本降低到3.141.0的测试,并且能够再次在即时窗口中执行代码。
Pretty sure I figured out the cause. Something with the Selenium.WebDriver nuget package with a 4.0+ version causes it. I'll have to do some more digging to figure out why tho.
I tested dropping the package version down to 3.141.0 and I was able to execute code in the immediate window again.