Open aruku opened 1 year ago
I wonder if you need to use Client::createSeleniumClient()
? I would guess that the browser-specific static methods are for the WebDriver implementation, not Selenium.
FWIW, I have set up a remote Geckodriver instance (instrumentisto/geckodriver
) instead of Selenium and that seems to work well. However Panther had to rather be hacked to get it to work:
FirefoxManager
as I needed it not to be final
private
properties in the above class needed to be switched to protected
start()
, so that the browser process start is skipped (it is permanently running in another container)I will stick with what I have, but it is not great code. The authors of Panther really did not want it to be extended in this fashion! Perhaps I will submit an improvement request, so that this can be done in a more elegant way.
Now that I look at it afresh, it might have been easier just to copy FirefoxManager
and amend the start()
method in situ. Still not a nice solution though.
For now, if you want to run your browser as a separate container, using Selenium probably is the most straightforward way.
I've been fighting with Panther and Selenium for two or three days on and off at this point, and so far they both keep eluding me. I've given up on using Selenium Grid to use a remote browser and I just want to get the basic testing example to work. I'm using the provided Dockerfile through Compose so I can specify the same network as the rest of my project; I have also changed
PANTHER_NO_SANDBOX
to false. Then, for the test, I made the following modifications trying to understand what arguments, options and capabilities are needed:I get this error:
I have replaced the actual local name for NAME in these snippets. Before it times out, I can see the panther and chromedriver processes spawning, but that is as far as I get. What I'm doing wrong?
Any feedback would be greatly appreciated.