Selenium for Games: Automating Tic Tac Toe
This recipe shows how to automate the playing of an online tic-tac-toe game using Selenium WebDriver and Java
This recipe shows how to automate the playing of an online tic-tac-toe game using Selenium WebDriver and Java
I’ve seen (and written) several automation projects where each page class requires a constructor that takes a WebDriver object so that the page classes can access the current browser instance. There’s nothing particularly wrong with this, but I do find it a bit annoying to pass around the WebDriver like a hot potato. There’s a couple of ways to handle it and both involve inheritance.