aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.6k stars 324 forks source link

HTMLUnitDriver support #427

Closed slopy closed 6 years ago

slopy commented 6 years ago

Hello, Thanks for selenoid! I would like to know if it's possible to use HTMLUnitDriver?

Regards.

vania-pooh commented 6 years ago

@slopy euh, so far as I know it was deprecated years ago. What's the purpose of that?

slopy commented 6 years ago

@vania-pooh not sure but seems like not deprecated http://htmlunit.sourceforge.net/changes-report.html . Well it's lightweight.

leorush commented 6 years ago

@slopy why don't you use it directly?

slopy commented 6 years ago

@leorush what do you mean by use it directly? The idea is to have selenoid grid under one url and have connection distributed properly.

Our selenium network have grown a little from time of my last comment. Now we have: 3 servers under load balancer, on each there are 1 selenoid (for chrome and FF with limit of connections 45) + 3 selenium-standalone ( for htmlunit with limit of 15 for each ) + ggr + selenoid-ui + ggr-ui This is working quite well, however I see few things missing and maybe you guys can help with those. (I'm not sure if I should put this topic here as this is related to other services you have built)

Once again thanks for brilliant tools you are building!

vania-pooh commented 6 years ago

Summon @aandryashin.

leorush commented 6 years ago

@slopy i mean that it seems that there is no need for selenoid to run parallel tests on HTMLUnit. And even Webdriver. You can use plain Java to work directly with HTMLUnit browser.

vania-pooh commented 6 years ago

@slopy we did some investigation. It seems that any Selenium server standalone image has HTMLUnit included. Do you need more instructions on how to build such image?

slopy commented 6 years ago

Yep, true that selenium-standalone has HtmlUnit and we are using it. We have host in quota file pointing to selenium-standalone (and it is working) however would be nice to simply set proper image in browsers.json. That way all stats will be in one place and no need for additional dependencies.

@vania-pooh do you mean like create proper docker image?

vania-pooh commented 6 years ago

@slopy I mean create \ find an image with java -jar selenium-server-standalone.jar as an entrypoint and then specify it in browsers.json.

slopy commented 6 years ago

@vania-pooh I have docker-compose.yml to manage services on each server and I'm using this image there so will try this solutions - sounds promising. Thanks a lot! Will update with results!

slopy commented 6 years ago

And it works. Dockerfile

FROM selenium/base
CMD java -jar /opt/selenium/selenium-server-standalone.jar

browsers.json

    "htmlunit": {
        "default": "2.30",
        "versions": {
            "2.30": {
                "image": "selenium_image:latest",
                "port": "4444",
                "path": "/wd/hub"
            }
        }
    }

Once again thanks a lot for help.

vania-pooh commented 6 years ago

:) You could leave your image ref here if it is public. Feel free to close the issue if resolved.

slopy commented 6 years ago

TBH I have not published this image - it's on machine. When it will go public I will try to remember to get back to this topic.

vania-pooh commented 6 years ago

@slopy any progress on this or closing?

slopy commented 6 years ago

Feel free to close the issue. I don't think I'm going to create public image.