【发布时间】:2022-12-06 19:22:12
【问题描述】:
[Test]
public void start()
{
string link = "https://www.w3schools.com/";
//i want to call this link in below test case
}
[Test]
public void CC1()
{
IWebDriver driver = new ChromeDriver();
WebDriverWait _wait = new WebDriverWait(driver, TimeSpan.FromSeconds(90));
InitialLogin(driver, _wait);
string url = start();//here i am calling this function
driver.Navigate().GoToUrl(url);//here i want the above link
}
我收到的错误信息是 无法将类型“void”隐式转换为“string”
【问题讨论】:
标签: c# selenium selenium-webdriver automated-tests