New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/bravostudiodev/bravo-grid

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bravostudiodev/bravo-grid

  • v0.0.0-20180228125558-91e601e93446
  • Source
  • Go
  • Socket score

Version published
Created
Source

bravo-grid

This project adds selenium grid extension to the official docker-selenium images to enable remote Sikuli operations and files transfer with grid nodes. Extensions are based on great project Selenium Grid Extensions.

Images included:

  • bravo/grid/hub: Image for running a Selenium Grid Hub
  • bravo/grid/node-chrome: Selenium node with Chrome installed, needs to be connected to a Selenium Grid Hub
  • bravo/grid/node-firefox: Selenium node with Firefox installed, needs to be connected to a Selenium Grid Hub
  • bravo/grid/node-chrome-debug: Selenium node with Chrome installed and runs a VNC server, needs to be connected to a Selenium Grid Hub
  • bravo/grid/node-firefox-debug: Selenium node with Firefox installed and runs a VNC server, needs to be connected to a Selenium Grid Hub

Building the images

build.sh

Running the images

bravogridctl.sh start

To stop running container use command:

bravogridctl.sh start

Using extensions

Extension proxy objects are instantiated through io.sterodium.rmi.protocol.client.RemoteNavigator as follows:

String urlHub = "http://192.168.99.100:4444/wd/hub"
RemoteWebDriver driver = new RemoteWebDriver(urlHub, caps);
URL urlHubParsed = new URL(urlHub);
String driverSessionId = driver.getSessionId().toString();
String EXTENSION_PATH_FMT = "/grid/admin/HubRequestsProxyingServlet/session/%s/BravoExtensionServlet"
String extensionPath = String.format(EXTENSION_PATH_FMT, driverSessionId);
RemoteNavigator = new RemoteNavigator(urlHubParsed.getHost(), urlHubParsed.getPort(), extensionPath);
SikuliScreen screen = navigator.createProxy(SikuliScreen.class, "screen");  
FileTransfer files = navigator.createProxy(FileTransfer.class, "files");

To remotelly control sikuli, first add base64 encoded png image content as sikuli target with choosen name and then search this target via sikuli using same name.

String b64PNG = DatatypeConverter.printBase64Binary(Files.readAllBytes(pngPath));
Strign myTargetName = "SomeUniqueName";
screen.addTarget(myTargetName, b64PNG);
ScreenRegion target = screen.find(myTargetName);
target.click()

To upload file call method saveFile on FileTransfer object, eg:

String remotePath = files.saveFile(".html", "/path/to/test.hml");
driver.get("file://" + remotePath);

Debugging

Install RealVNC or any other VNC client, and connect to 127.0.0.1:6000 (Chrome) or 127.0.0.1:7000 (Firefox)

FAQs

Package last updated on 28 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc