導航()C

可以直接瀏覽瀏覽器,例如使用所有瀏覽器上提供的標準工具欄命令:

StackOverflow 文件

你可以通過在驅動程式上呼叫 Navigate() 來建立導航物件:

IWebDriver driver
INavigation navigation = driver.Navigate();

導航物件允許你執行許多操作來瀏覽 Web 上的瀏覽器:

//like pressing the back button
navigation.Back();
//like pressing the forward button on a browser
navigation.Forward();
//navigate to a new url in the current window
navigation.GoToUrl("www.stackoverflow.com");
//Like pressing the reload button
navigation.Refresh();