请帮我解决这个问题。 我的第二种方法依赖于第一种方法,依此类推。 我没有使用driver.quit()或driver.close()
[TestMethod]
public void CheckInAsDcs()
{
Thread.Sleep(2000);
Assert.AreEqual(driver.Title, "NeuTravel");
var selectDropDown = driver.FindElement(By.Id("viewSelect"));
var dcsOption = driver.FindElements(By.TagName("option"))[1];
//checking for dcs in dropdown
var checkForDcs = driver.FindElement(By.Id("viewSelect"));
dcsOption.Click();
Thread.Sleep(2000);
}
[TestMethod]
public void CreateNewRequest()
{
//calling CheckInAsDcs function
CheckInAsDcs();
//waiting for the web elements to load
Thread.Sleep(10000);
//finding CreateNewRequest button and clicking it
var selectCreateNewReq = driver.FindElements(By.TagName("input"));
selectCreateNewReq[0].Click();
}