BDD with PageObject

Add taking screenshot to the assertion step

In the assertion step, we just need to add one line in "verifyItemAddedShownInShoppingCart" in "buy_book.rb":

@driver.save_screenshot ("screenshot.png")

alt text

The scrrenshot will be named as "screenshot.png" under "Cucumber" folder.

alt text