gpt4 book ai didi

.net - NUnit GUI 运行程序和单元状态

转载 作者:行者123 更新时间:2023-11-28 19:42:40 24 4
gpt4 key购买 nike

如何在 NUnit GUI 运行程序中设置单元状态?我正在尝试使用 WatiN 运行单个 NUnit 测试,我收到消息:

MyNamespace.LoginTests.CanLogin:
System.Threading.ThreadStateException : The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer.

最佳答案

从 NUnit 2.5 开始,使用 RequiresSTA测试中的属性。

关于.net - NUnit GUI 运行程序和单元状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2463461/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com