Changing URL in a CodedUI Test [closed]

a 夏天 提交于 2019-12-21 17:37:03

问题


I have created a codedui test in Visual Studio 2012. The problem is that I need to be able to change the URL occasionally that opens in the browser as each step of the project is updated to a new version. Apart from the fact there seems to be a number of instances where the URL appears, when I do change it, it seems to reset itself after doing a rebuild.

Is there an easier way to ensure that the URL I set does not change? I'm fairly new to the testing suite so I may have missed something glaringly obvious.

I have looked for some decent tutorials regarding the VS2012 Testing but if anybody could recommend one that I may have missed that would also be very helpful.


回答1:


You can use the Coded UI Test Editor in Visual Studio Feature Pack 2 to visually update the parameter without any coding.

See the following blog post for a tutorial and info on obtaining the extension: http://windotnet.blogspot.com/#!/2011/07/coded-ui-test-editor-is-visual-studio.html

-Paul




回答2:


You can try Data Driven Coded UI. http://msdn.microsoft.com/en-us/library/ee624082.aspx You can pass various url as parameters to Coded UI.



来源:https://stackoverflow.com/questions/13376084/changing-url-in-a-codedui-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!