How to detect availability of previous/next page in Selenium?

Viewed 1079

I understand that Selenium's WebDriver has some methods to navigate backwards/forwards in the browser.

Back: driver.Navigate().Back(); Forward: driver.Navigate().Forward();

Now I would like to check if these methods do lead to an available page, before actually clicking the buttons (in your browser, the arrows are either bold or light grey).

How do I do this?

1 Answers
Related