Let’s look at the codes to refresh the Browser in many different ways with Selenium WebDriver. Sometimes on certain browsers or on certain pages, normal refresh command deos not work, in those situations we can easily usethese commands to solve out purpose.
1) Refresh command: Most commonly used and simple command for refreshing a webpage.
2) SendKeys command: Second most commonly used command for refreshing a webpage. As it is using a send keys method, we must use this on any Text box on a webpage.
3) Get command: This is a tricky one, as it is using another command as an argument to it. If you look carefully, it is just feeding get command with a page url.
4) To command: This command is again using the same above concept. navigate( ).to( ) is feeding with a page url and an argument.
5) SendKeys command: This is same SendKeys command but instead of using Key, it is using ASCII code.
No comments:
Post a Comment