Skip to content

Commit eea56ac

Browse files
lf2ahhslepicka
authored andcommitted
Added navigation methods
1 parent 5453748 commit eea56ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

botcity/web/bot.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,24 @@ def browse(self, url):
883883
"""
884884
self.navigate_to(url)
885885

886+
def back(self):
887+
"""
888+
Goes one step backward in the browser history.
889+
"""
890+
self._driver.back()
891+
892+
def forward(self):
893+
"""
894+
Goes one step forward in the browser history.
895+
"""
896+
self._driver.forward()
897+
898+
def refresh(self):
899+
"""
900+
Refreshes the current page.
901+
"""
902+
self._driver.refresh()
903+
886904
@contextmanager
887905
def wait_for_new_page(self, waiting_time=10000, activate=True):
888906
"""Context manager to wait for a new page to load and activate it.

0 commit comments

Comments
 (0)