Skip to content

Commit

Permalink
Merge branch 'trunk' into translate
Browse files Browse the repository at this point in the history
  • Loading branch information
alaahong committed Jan 27, 2024
2 parents e3bdc68 + 50f3836 commit 82150fb
Show file tree
Hide file tree
Showing 341 changed files with 12,199 additions and 10,140 deletions.
34 changes: 11 additions & 23 deletions .github/workflows/dotnet-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,28 @@ jobs:
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
- name: Install Chrome for set binary test
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
id: setup-chrome
- name: Install Edge for set binary test
uses: browser-actions/setup-edge@v1
with:
edge-version: stable
id: setup-edge
- name: Install Firefox for set binary test
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest
id: setup-firefox
- name: Set ENV Windows
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
echo "EDGE_BIN=${{ steps.setup-edge.outputs.edge-path }}" >> $env:GITHUB_ENV
- name: Set ENV Other
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=${{ steps.setup-edge.outputs.edge-path }}" >> "$GITHUB_ENV"
echo "FF_BIN=${{ steps.setup-firefox.outputs.firefox-path }}" >> "$GITHUB_ENV"
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
- name: Set up .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Run tests
uses: nick-invision/retry@v2.8.3
with:
Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/java-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,16 @@ jobs:
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
- name: Install Chrome for set binary test
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
id: setup-chrome
- name: Install Edge for set binary test
uses: browser-actions/setup-edge@v1
with:
edge-version: stable
id: setup-edge
- name: Install Firefox for set binary test
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest
id: setup-firefox
- name: Set ENV Windows
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
- name: Set ENV Mac
if: matrix.os == 'macos-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
- name: Set ENV Linux
if: matrix.os == 'ubuntu-latest'
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/js-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ jobs:
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/kotlin-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ jobs:
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
43 changes: 12 additions & 31 deletions .github/workflows/python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,16 @@ jobs:
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
- name: Install Chrome for set binary test
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
id: setup-chrome
- name: Install Edge for set binary test
uses: browser-actions/setup-edge@v1
with:
edge-version: stable
id: setup-edge
- name: Install Firefox for set binary test
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest
id: setup-firefox
- name: Set ENV Windows
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
- name: Set ENV Mac
if: matrix.os == 'macos-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
- name: Set ENV Linux
if: matrix.os == 'ubuntu-latest'
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand All @@ -76,6 +52,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Run tests
uses: nick-invision/retry@v2.8.3
with:
Expand Down
43 changes: 12 additions & 31 deletions .github/workflows/ruby-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,16 @@ jobs:
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
- name: Install Chrome for set binary test
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
id: setup-chrome
- name: Install Edge for set binary test
uses: browser-actions/setup-edge@v1
with:
edge-version: stable
id: setup-edge
- name: Install Firefox for set binary test
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@v1
with:
firefox-version: latest
id: setup-firefox
- name: Set ENV Windows
- name: Remove driver directories Windows
if: matrix.os == 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
- name: Set ENV Mac
if: matrix.os == 'macos-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
- name: Set ENV Linux
if: matrix.os == 'ubuntu-latest'
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows-latest'
run: |
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand All @@ -75,6 +51,11 @@ jobs:
- name: Install Gems
working-directory: ./examples/ruby
run: bundle install
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Run tests
uses: nick-invision/retry@v2.8.3
with:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Software Freedom Conservancy (SFC)
Copyright 2024 Software Freedom Conservancy (SFC)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
15 changes: 15 additions & 0 deletions examples/dotnet/HelloSelenium.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using OpenQA.Selenium.Chrome;

namespace SeleniumDocs.Hello;

public static class HelloSelenium
{
public static void Main()
{
var driver = new ChromeDriver();

driver.Navigate().GoToUrl("https://selenium.dev");

driver.Quit();
}
}
4 changes: 2 additions & 2 deletions examples/dotnet/SeleniumDocs/BaseChromeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace SeleniumDocs
public class BaseChromeTest : BaseTest
{
[TestInitialize]
public void CreateDriver()
public void AutoStartDriver()
{
driver = new ChromeDriver();
StartDriver();
}
}
}

0 comments on commit 82150fb

Please sign in to comment.