Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ruby Example to Selenium Manager #1969

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions examples/ruby/spec/selenium_manager/usage.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require 'selenium-webdriver'

def setup_without_selenium_manager
service = Selenium::WebDriver::Chrome::Service.new(path: '/path/to/chromedriver')
driver = Selenium::WebDriver.for(:chrome, service: service)
driver.get("https://www.selenium.dev/documentation/selenium_manager/")
driver.quit
end

def setup_with_selenium_manager
driver = Selenium::WebDriver.for(:chrome) # Selenium Manager handles the driver automatically
driver.get("https://www.selenium.dev/documentation/selenium_manager/")
driver.quit
end
7 changes: 5 additions & 2 deletions website_and_docs/content/documentation/selenium_manager.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
{{% tab header="Ruby" %}}
**Previously**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L3-L8" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L10-L14" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< badge-code >}}
Expand Down
7 changes: 5 additions & 2 deletions website_and_docs/content/documentation/selenium_manager.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
{{% tab header="Ruby" %}}
**Previously**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L3-L8" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L10-L14" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
{{% tab header="Ruby" %}}
**Previously**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L3-L8" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L10-L14" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< badge-code >}}
{{% tab header="Ruby" %}}
**Previously**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L3-L8" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/ruby/spec/selenium_manager/usage.rb#L10-L14" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< badge-code >}}
Expand Down