小编But*_*ler的帖子

How do I pass in a string parameter that can either be one or two within a method? selenium c#

I wish to use this method in another method, but the problem is chooseFleet can either be one or two. How to do this in C#?

[TestMethod]
[TestCategory("UserMgt")]
public void CompleteRegProcessPass(string role, string chooseFleet)
{
    var blobClient = new AzureStorageBlobClient(AzureStorageBlobClient);
    _regRep.btnAddUser.Click();

    objCommon.EnterText(_regRep.firstNameAdd, userName);
    objCommon.EnterText(_regRep.lastNameAdd, "Smithy");
    objCommon.EnterText(_regRep.userEmailAdd, emailID);
    objCommon.EnterText(_regRep.userTelephoneAdd, "12345678901");
    objCommon.Exists(_regRep.userRoleManager, 10);
    objCommon.ScrollInToViewAndClick(**role**);
    objCommon.Exists(_regRep.chooseFleet, 5);
    objCommon.ScrollInToViewAndClick(cf1);
            objCommon.ScrollInToViewAndClick(cf2);
    objCommon.Click(_regRep.btnSaveUser);
    System.Threading.Thread.Sleep(1000);
}
Run Code Online (Sandbox Code Playgroud)

c# selenium-webdriver

0
推荐指数
1
解决办法
58
查看次数

标签 统计

c# ×1

selenium-webdriver ×1