Google Chrome中的“FailedToPerformActionOnBlockedControlException” [英] 'FailedToPerformActionOnBlockedControlException' in Google Chrome
问题描述
我正在尝试运行CodedUI测试并设置如下代码:
I'm attempting to run a CodedUI test and have set up the code as below:
public void ShopForAlbumViaCategory()
{
BrowserWindow.CurrentBrowser = "Chrome";
var browserWindow = BrowserWindow.Launch(new Uri("http://localhost:26641/"));
HomePage siteHome = new HomePage(browserWindow);
然而,当我运行测试时它失败了,我收到以下错误:
However, when I run the test it fails and I get the below error:
结果消息:
测试方法UITestAutomationPageObjects.ShopForProducts.ShopForAlbumViaCategory引发异常:
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException:未知错误:Runtime.executionContextCreated has无效的'上下文':{" auxData":{" frameId":" 10712.1"," isDefault":true}," id":1," name":""," origin":"://"}
(会话信息:chrome = 57.0.2987.133)
(驱动程序信息:chromedriver = 2.9.248315,platform = Windows NT 6.3 x86_64)
当我处于停滞状态时,有没有人对这个问题有任何想法。我已下载了Cross Browser Selenium Components NuGet软件包,但尚未解决。
Does anyone have any ideas on what the issue might be as I'm at a standstill. I've downloaded the Cross Browser Selenium Components NuGet package, but this hasn't resolved it.
Andrew Tilston
Andrew Tilston
推荐答案
安德鲁,
感谢您的帖子。
我可以问一下 您正在使用哪个版本的Visual Studio?
May I ask which version of Visual Studio you're using?
如果是Visual Studio 2015,请记得安装此修补程序:
If it's Visual Studio 2015, please remember to install this hotfix:
顺便说一下,您测试的所有代码上方的代码是什么? 请与我们分享所有代码测试编码,如果没关系。谢谢。
祝你好运,
Fletch
这篇关于Google Chrome中的“FailedToPerformActionOnBlockedControlException”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!