diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index aa501f6..c978bcd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,18 +7,19 @@ on: jobs: deploy: runs-on: ubuntu-latest - container: - image: crystallang/crystal steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false + - uses: crystal-lang/install-crystal@v1 + with: + crystal: latest - name: "Install shards" run: shards install - name: "Generate docs" run: crystal docs - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml index f1e090f..ee83378 100644 --- a/.github/workflows/specs.yml +++ b/.github/workflows/specs.yml @@ -14,18 +14,17 @@ jobs: continue-on-error: false steps: - name: Download source - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Crystal uses: crystal-lang/install-crystal@v1 + with: + crystal: latest - name: Install shards run: shards install - name: Format run: crystal tool format --check - name: Crystal Ameba Linter - id: crystal-ameba - uses: crystal-ameba/github-action@v0.7.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./bin/ameba verify-chrome: strategy: fail-fast: false @@ -40,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: crystal-lang/install-crystal@v1 with: crystal: ${{ matrix.crystal_version }} diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml new file mode 100644 index 0000000..b209ce6 --- /dev/null +++ b/.github/workflows/weekly.yml @@ -0,0 +1,54 @@ +name: Selenium Weekly CI + +on: + schedule: + - cron: "0 1 * * MON" + workflow_dispatch: + +jobs: + check_format: + strategy: + fail-fast: false + runs-on: ubuntu-latest + continue-on-error: false + steps: + - name: Download source + uses: actions/checkout@v4 + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: latest + - name: Install shards + run: shards install + - name: Format + run: crystal tool format --check + - name: Crystal Ameba Linter + run: ./bin/ameba + verify-chrome: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + crystal: nightly + - os: windows-latest + crystal: nightly + - os: macos-latest + crystal: nightly + runs-on: ${{ matrix.os }} + continue-on-error: false + steps: + - uses: actions/checkout@v4 + - uses: crystal-lang/install-crystal@v1 + with: + crystal: ${{ matrix.crystal_version }} + - uses: browser-actions/setup-chrome@v1 + with: + chrome-version: stable + if: matrix.os == 'windows-latest' + - name: Install dependencies + run: shards install --ignore-crystal-version --skip-executables --skip-postinstall + - name: Run tests + run: crystal spec --tag "~chrome" + env: + SELENIUM_BROWSER: chrome diff --git a/README.md b/README.md index 6b16d80..9249a62 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Selenium client for interacting with web pages for browser automation. -[API Documentation](https://matthewmcgarvey.github.io/selenium.cr/) +[API Documentation](https://crystal-loot.github.io/selenium.cr/) ## Installation @@ -11,7 +11,7 @@ Selenium client for interacting with web pages for browser automation. ```yaml dependencies: selenium: - github: matthewmcgarvey/selenium.cr + github: crystal-loot/selenium.cr ``` 2. Run `shards install` @@ -46,7 +46,7 @@ driver = Selenium::Driver.for(:chrome, service: service) ``` You must call `driver.stop` when you are finished or it will leave the service running. -Consider using [webdrivers.cr](https://github.com/matthewmcgarvey/webdrivers.cr) for automatically installing drivers and managing the driver path for you. +Consider using [webdrivers.cr](https://github.com/crystal-loot/webdrivers.cr) for automatically installing drivers and managing the driver path for you. ### Creating a Session @@ -116,7 +116,7 @@ Running just `crystal spec` will use chrome. ## Contributing -1. Fork it () +1. Fork it () 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) diff --git a/shard.yml b/shard.yml index c5168bf..da6d034 100644 --- a/shard.yml +++ b/shard.yml @@ -10,4 +10,4 @@ development_dependencies: version: ~> 0.4 ameba: github: crystal-ameba/ameba - version: ~> 1.6 + version: ~> 1.5.0 \ No newline at end of file diff --git a/src/selenium/firefox/capabilities.cr b/src/selenium/firefox/capabilities.cr index e84f6b1..47137f4 100644 --- a/src/selenium/firefox/capabilities.cr +++ b/src/selenium/firefox/capabilities.cr @@ -11,5 +11,6 @@ class Selenium::Firefox::Capabilities < Selenium::Capabilities end property args = [] of String + property binary : String? end end