How to return to browser history in the Geb test

Inside the Geb test, I would like to return to the browser history (for example, click the browser button). I have not found a way to do this using the Geb API.

What am I doing:

driver.navigate().back()               // usage of WebDriver API
browser.page(<<previous Page class>>)  // this tells Geb that the page has changed

The code works, but I don't like using the WebDriver API. Another idea is to do this in JavaScript, but it is also something that I would like to avoid.

Is there another way to navigate the Gebish browser history?

+4
source share
1 answer

I believe not. I would also use the WebDriver API to jump back. Sometimes you need to use the WebDriver API, so the WebDriver instance is displayed in the Geb Browser class.

+5
source

Source: https://habr.com/ru/post/1524783/


All Articles