seleniumkit / selenograph

Powered version of Selenium Grid Router
Other
42 stars 14 forks source link

How to initialize driver when using selenograph #19

Open adishreepaliwal opened 7 years ago

adishreepaliwal commented 7 years ago

I am using Selenograph to run my test cases which are in turn using docker based zelenium instances to execute the java based Test Cases. I am somehow not able to initialize my Remote Web Driver. Can you please help me with this ?

vania-pooh commented 7 years ago

@adishreepaliwal all these tools are using just the same pattern of initializing the session:

final DesiredCapabilities browser = new DesiredCapabilities("firefox", "55.0", Platform.LINUX);
RemoteWebDriver driver = new RemoteWebDriver(new URL("http://username:password@example.com:4444/wd/hub"), browser);

However just for your information - Selenograph was abandoned at least a year ago. New latest and greatest Selenium tools are here:

adishreepaliwal commented 7 years ago

Thanks @vania-pooh for the prompt reply. I would now explore selenoid and ggr. But since our zalenium/ selenoid would be set up across multiple machines , it would be difficult to find the host name (i.e example.com in this case). I will be instructing the execution of the job on the ggr / selenograph server which will further propogate the execution of the test cases on multiple selenoid instances. So, how should we initialize our webdrivers since we donot know on which selenoid instance my test case would execute as it will be picked up randomly by ggr ?

vania-pooh commented 7 years ago

To have a small Selenium grid one Ggr instance is sufficient to run the tests. Hostname will not change. For reliable Selenium cluster you need to install two or more Ggr instances behind load balancer (such as AWS Elastic Load Balancer). This load balancer will have fixed IP address and you can add a DNS record to have human-readable hostname. Anyway once installed hostname always remains the same.