Skip to content

Commit

Permalink
Merge branch 'trunk' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
luisfcorreia authored Oct 25, 2023
2 parents 114e6d5 + 357295a commit 889fec3
Show file tree
Hide file tree
Showing 367 changed files with 13,745 additions and 10,523 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dotnet-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ 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
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
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/java-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ 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
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'
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/js-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ 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
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'
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/kotlin-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ 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
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'
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ 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
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'
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ruby-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ 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
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'
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"
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
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();
}
}
15 changes: 15 additions & 0 deletions examples/dotnet/SeleniumDocs/BaseTest.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;

namespace SeleniumDocs
{
public class BaseTest
{
protected IWebDriver driver;

public void StartDriver()
{
driver = new ChromeDriver();
}

public void StartDriver(string browserVersion)
{
ChromeOptions options = new ChromeOptions
{
BrowserVersion = browserVersion
};
driver = new ChromeDriver(options);
}

[TestCleanup]
public void QuitDriver()
{
Expand Down
Loading

0 comments on commit 889fec3

Please sign in to comment.