I'm newbie on ruby language... Currently I am using POM (page objects model) with Selenium webdriver.
This is my throuble:
As I'm using selenium with POM, I have 3 classes (register.br, login.br and log_out.br) and in my main class im calling the objects and methods for execute the Test (test.br)
How each class has
@driver=Selenium::WebDriver.for :firefoxthe problem is when I execute my main class (test.br), every class called with these
@driveropen a new browser...
My question is: How can I do for instantiate each class my selenium webdriver, realizing all the process just in one browser (the process is register, login and logout).
Currently the process is completed but in three firefox browsers and I need just all the process in the same browser..
PD: I used
$driver=Selenium::WebDriver.for :firefox with the
$ in the test.br class and called in every class with the
require relativebut doesn't work