other

WebDriver Screenshot Tutorial

Reading Time

WebDriver Screenshot taken can help to visually see a webpage. WebDriver provides many features but sadly there any methods which allows us to make visual assertions. Taking screenshots can help a person to visually assert that a test has passed.

WebDriver Screenshot Video Tutorial

Note that when your tests are running in a headless state it is not possible to take screenshots as there is no visual representation of the webpage while the test is running. It is also advisable to write tests which are fully self sufficient. In other words a given tests should not need any manual intervention to decided if it has passed or not.