本文介绍了编码的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是否有所作为。


解决方案

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.

解决方案


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

10-28 05:25