如何为 sauce lab pre 运行 - C# 设置静音模式
how to set silent mode for sauce lab pre run - C#
我想在我的测试 运行 之前使用 sauce labs pre-run
功能来 运行 一些可执行文件,我想为 pre-run
设置静默模式参数能力。
下面是我到目前为止一直在尝试的代码片段。
DesiredCapabilities capabilities = new DesiredCapabilities();
Dictionary<string, object> obj = new Dictionary<string, object>
{
{ "executable", "http://url.to/my/executable" },
{ "background", true },
{ "timeout", 120 }
};
capabilities.SetCapability("prerun", obj);
请建议我如何在这里设置静音模式。
我知道 solution in java,但不确定如何在 C# 中实现。
我能够通过定义 LinkedList
并向其添加静默模式参数来添加静默模式参数。最后,使用 args
键将 LinkedList
对象添加到前 运行 参数。下面是代码片段。
DesiredCapabilities capabilities = new DesiredCapabilities();
Dictionary<string, object> prerunParams = new Dictionary<string, object>();
prerunParams.Add("executable", "http://url.to/my/executable");
LinkedList<string> args = new LinkedList<string>();
args.AddLast("/S");
args.AddLast("-a");
args.AddLast("-q");
prerunParams.Add("args", args);
prerunParams.Add("background", false);
prerunParams.Add("timeout", 60);
capabilities.SetCapability("prerun", prerunParams);
我想在我的测试 运行 之前使用 sauce labs pre-run
功能来 运行 一些可执行文件,我想为 pre-run
设置静默模式参数能力。
下面是我到目前为止一直在尝试的代码片段。
DesiredCapabilities capabilities = new DesiredCapabilities();
Dictionary<string, object> obj = new Dictionary<string, object>
{
{ "executable", "http://url.to/my/executable" },
{ "background", true },
{ "timeout", 120 }
};
capabilities.SetCapability("prerun", obj);
请建议我如何在这里设置静音模式。 我知道 solution in java,但不确定如何在 C# 中实现。
我能够通过定义 LinkedList
并向其添加静默模式参数来添加静默模式参数。最后,使用 args
键将 LinkedList
对象添加到前 运行 参数。下面是代码片段。
DesiredCapabilities capabilities = new DesiredCapabilities();
Dictionary<string, object> prerunParams = new Dictionary<string, object>();
prerunParams.Add("executable", "http://url.to/my/executable");
LinkedList<string> args = new LinkedList<string>();
args.AddLast("/S");
args.AddLast("-a");
args.AddLast("-q");
prerunParams.Add("args", args);
prerunParams.Add("background", false);
prerunParams.Add("timeout", 60);
capabilities.SetCapability("prerun", prerunParams);