编码的UI不适用于Firefox,但适用于Chrome [英] Coded UI doesn't work on Firefox but works on Chrome

查看:113
本文介绍了编码的UI不适用于Firefox,但适用于Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用Visual Studio Enterprise 2015(第14版更新3)并安装了所有必要的内容,以便在编码用户界面中启用跨浏览器播放。  ;例如,我可以使用我最新的Chrome(v57)来处理此处找到的此修复程序:


(https://support.microsoft.com/en-us/ help / 3211422 / fix-issues-with-action-recording-using-microsoft-test-manager-and-coded-ui-tests-using-visual-studio)


然而,这个修复不适用于我最新的Firefox(v52)。 我甚至发现这篇文章(https:/marketplace.visualstudio.com/items?itemName = AtinBansal.SeleniumcomponentsforCodedUICrossBrowserTesting) 表示这是一个已知问题,但Firefox v47.0.1
应该有效。 好吧,我尝试了旧版本和其他旧版本的Firefox,似乎没有任何工作。所以我的问题是,你有什么想法,我们可以期待Firefox的修复吗?


这是我在开始时一直遇到的常数错误 当我尝试启动网址时:


测试名称:  CodedUITestMethod1

测试FullName:  EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1

测试来源:  C:\Development_002 \_Testing \Automation \NewHireEmployeePortal \NewHireEmployeePortal \CodedUITest1.cs:第36行

测试结果: 失败

测试持续时间:  0:00:00.5034783


结果StackTrace: 

at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.ProxyFirefoxDriver。<> c__DisplayClass1_0。< .ctor> b__0()

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.FuncInvoker.InvokeMethod [T](Func`1函数)

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.ProxyFirefoxDriver..ctor(ProxyFirefoxProfile profile)

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.BrowserServices.FirefoxBrowserService.InitializeWebDriver(String [] args)

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService。<> c。< .cctor> b__3_1(String [] args)

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.Launch(String [] args)

  在Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.Launch(String []参数)

  在Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.LaunchPrivate(String []参数)

  在Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow。<> c__DisplayClass3_0。< Launch> b__0()

  在Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod [T](Func`1函数,UITestControl控件,布尔firePlaybackErrorEvent,布尔logAsAction)

  在Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.Launch(String []参数)

   at EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1()in C:\Development_002\FitnessIntl\EmployeePortal\_Testing\Automation\NewHireEmployeePortal \NewHireEmployeePortal \CodedUITest1.cs:line 42

结果讯息: 

测试方法EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1抛出异常:


System.NullReferenceException:对象引用未设置为对象的实例。




PS此表单上的论坛下拉列表仅显示VS 2010和2012,所以不确定我是否在适当的位置询问VS 2015是否有所作为。


解决方案

朋友,


对你的痛苦感到抱歉。几个月来我和你有同样的问题。


今天,我试图重复这个问题和同样的结果。我使用的是32位firefox,然后我下载了64位,因为我的操作系统是基于64位的。


老实说,我仍然无法启动firefox(64位),但这次错误有所不同:



我试图在我的系统中设置默认值,但没有运气。



但是,作为解决方法,我在编码的UI测试构建器中使用了"记录"按钮。


我所做的只是启动Firefox浏览器并给它一个网站,输入,转到该页面并关闭它。


好吧,它运作正常!


注意: 这只能在我的Windows上使用64位工作,我尝试了32位的Firefox失败了。




所以,我建议您尝试使用64位Firefox如果您的操作系统是64位。


祝你好运。


我会继续研究它。




祝你好运,


Fletch







Hi,

I'm using Visual Studio Enterprise 2015 (v14 update 3) and got everything necessary installed to enable cross browser playback in Coded UI.  For example, I'm able to get my latest Chrome (v57) to work with this fix found here:

(https:/support.microsoft.com/en-us/help/3211422/fix-issues-with-action-recording-using-microsoft-test-manager-and-coded-ui-tests-using-visual-studio)

However, this fix did not work for my latest Firefox (v52).  I even found this article (https:/marketplace.visualstudio.com/items?itemName=AtinBansal.SeleniumcomponentsforCodedUICrossBrowserTesting) that says it is a known issue but Firefox v47.0.1 should work.  Well, I tried that older version and other older versions of Firefox and nothing seems to be working. So my question is do you have any idea when we can expect a fix for Firefox, too??

Here's the constant error I keep getting in the beginning when I try to launch a url:

Test Name: CodedUITestMethod1
Test FullName: EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1
Test Source: C:\Development_002\_Testing\Automation\NewHireEmployeePortal\NewHireEmployeePortal\CodedUITest1.cs : line 36
Test Outcome: Failed
Test Duration: 0:00:00.5034783

Result StackTrace: 
at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.ProxyFirefoxDriver.<>c__DisplayClass1_0.<.ctor>b__0()
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.FuncInvoker.InvokeMethod[T](Func`1 function)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowserProxy.ProxyFirefoxDriver..ctor(ProxyFirefoxProfile profile)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.BrowserServices.FirefoxBrowserService.InitializeWebDriver(String[] args)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.<>c.<.cctor>b__3_1(String[] args)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.Launch(String[] args)
   at Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.Launch(String[] arguments)
   at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.LaunchPrivate(String[] arguments)
   at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.<>c__DisplayClass3_0.<Launch>b__0()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.Launch(String[] arguments)
   at EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1() in C:\Development_002\FitnessIntl\EmployeePortal\_Testing\Automation\NewHireEmployeePortal\NewHireEmployeePortal\CodedUITest1.cs:line 42
Result Message: 
Test method EmployeePortalExistingEmployee.CodedUITest1.CodedUITestMethod1 threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.

P.S. The Forum dropdown on this form only displays VS 2010 and 2012, so not sure if I'm in the right place to ask for VS 2015 if that makes a difference.

解决方案

Hi friend,

Sorry about your suffering. I had same issue as you for months.

Today, I tried to repro this issue and same result. What I used I 32 bit firefox, then I downloaded a 64-bit one, as my OS is 64 bit based.

To be honest, I still failed to launch firefox (64bit), but this time the error is different:

I tried to set the default in my system, but with no luck.

But, as a workaround, I used "Record" button in coded UI test builder.

what I did is just launch Firefox browser and gave it a website, enter, went to that page, and close it.

well, it works fine!

Note:  This only works by using 64bit on my windows, I tried 32-bit firefox which failed.

So, I suggest you could try to use 64-bit Firefox if your OS is 64bit.

Good luck.

I will keep research it.

Best regards,

Fletch


这篇关于编码的UI不适用于Firefox,但适用于Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆