I would like to create a program which creates Selenium WebDriver objects upon request by another test/program/framework. Please allow me to call this program as 'Selenium WebDriver Dispenser' or just Dispenser. I do not want that the dispenser to terminate when the requesting program terminates.
Similar to 'Database Connection Pooling' using 'Apache Commons DBCP' which dispense database connection objects and maintain the connection objects. But I want this pooling or dispenser class to be external to the program which is requesting these connection objects.
The idea is:
- A test would start
- Test would request for a Selenium WebDriver object
- Dispenser would create one and dispense it
- Test may fail in the middle
- WebDriver object is still alive
- The same test which failed in the middle could request for the same WebDriver object and shall use it. Test would resume from where it stopped.
I can't imagine how do I achieve this. Selenium WebDriver is not a Serializable object.
Could you please help me with this. Thanks.
Aucun commentaire:
Enregistrer un commentaire