【发布时间】:2013-11-26 14:52:03
【问题描述】:
我想在我的系统的不同副本(不同的 url - 相同的系统)中运行我记录的 coded-ui 测试。我需要更改 URL 字符串,并且我想在我的测试文件中执行此操作(在本例中名为:d01.cs) 这里是: 我有一个测试名称 D01.cs,这是我定义参数的部分:
public void D01()
{
this.UIMap.D01Params.UIRtbTxt1EditText = TestContext.DataRow["test1"].ToString();
this.UIMap.D01();
In UIMap.Designer i found this:
public class D01Params
#region Fields
/// <summary>
/// Go to web page 'http://localhost:8095/Login.aspx' using new browser instance
/// </summary>
public string UIBlankPageWindowsInteWindowUrl = "http://localhost:8095/Login.aspx"
我想将 url 作为参数写入我的 D01.cs 文件中。如果可能的话,我想从 excel 中获取它。但我找不到正确的属性来设置它。 this.UIMAP... 没有回答
我该怎么办?我尝试使用: this.UIBlankPageWindowsInteWindowUrl 但仍然无法正常工作。
【问题讨论】:
-
你试过这个问题的答案吗:stackoverflow.com/questions/13376084/… ?
-
是的,我看过但我找不到我正在寻找的答案。该主题建议使用测试编辑器,但我喜欢从我保存其他参数的 excel 中获取我的 URL。我的意思是,使用这些参数在这个 URL 中运行这个测试。我对每个字段都很好,但我找不到正确的属性来设置我的 URL
-
顺便说一句,我使用的是同一个浏览器。就我而言,相同的 Internet Explorer。我只需要重写 URL。
标签: c# testing url-rewriting automated-tests coded-ui-tests