Skip to content

Conversation

bonigarcia
Copy link
Member

Description

This PR includes the required Rust logic to download the Selenium Grid binaries (selenium-server.jar) from the GitHub releases with Selenium Manager using the flag --grid <GRID_VERSION>. Here it is some examples of its usage and output:

C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --debug --grid
DEBUG   Required driver: selenium-server 4.10.0
DEBUG   Driver URL: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.10.0/selenium-server-4.10.0.jar
INFO    C:\Users\boni\.cache\selenium\grid\4.10.0\selenium-server-4.10.0.jar
C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --debug --grid 4.9.0
DEBUG   Driver URL: https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.9.0/selenium-server-4.9.0.jar
INFO    C:\Users\boni\.cache\selenium\grid\4.9.0\selenium-server-4.9.0.jar
C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --debug --grid 4.11.0-SNAPSHOT
DEBUG   Driver URL: https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.11.0-SNAPSHOT.jar
INFO    C:\Users\boni\.cache\selenium\grid\4.11.0-SNAPSHOT\selenium-server-4.11.0-SNAPSHOT.jar
C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --debug --grid 9.9.9
DEBUG   Driver URL: https://github.com/SeleniumHQ/selenium/releases/download/selenium-9.9.0/selenium-server-9.9.9.jar
ERROR   Unsuccessful response (404 Not Found) for URL https://github.com/SeleniumHQ/selenium/releases/download/selenium-9.9.0/selenium-server-9.9.9.jar

Motivation and Context

Ruby implements the feature in its binding. Could replace that logic with calling selenium manager.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bonigarcia bonigarcia added the C-rust Rust code is mostly Selenium Manager label Jun 28, 2023
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (trunk@c49361a). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head b952a9b differs from pull request most recent head 3fb3b61. Consider uploading reports for the commit 3fb3b61 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff            @@
##             trunk   #12281   +/-   ##
========================================
  Coverage         ?   57.25%           
========================================
  Files            ?       86           
  Lines            ?     5488           
  Branches         ?      228           
========================================
  Hits             ?     3142           
  Misses           ?     2118           
  Partials         ?      228           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @bonigarcia!

@diemol diemol merged commit a597e72 into trunk Jun 28, 2023
@diemol diemol deleted the se_mgr_grid branch June 28, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-rust Rust code is mostly Selenium Manager
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants