Skip to content

Commit c4517f2

Browse files
authored
Merge branch 'trunk' into rb_move_locators_example
2 parents 10ee711 + f6d21a1 commit c4517f2

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

.github/workflows/ruby-examples.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
steps:
3232
- name: Checkout GitHub repo
3333
uses: actions/checkout@v4
34-
- name: Install Safari Technology Preview
35-
if: matrix.os == 'macos-latest'
36-
run: |
37-
brew install --cask safari-technology-preview
3834
- name: Remove driver directories Windows
3935
if: matrix.os == 'windows-latest'
4036
run: |
@@ -55,7 +51,7 @@ jobs:
5551
bundler-cache: true
5652
- name: Install Gems Nightly non-Windows
5753
if: matrix.release == 'nightly' && matrix.os != 'windows-latest'
58-
run:
54+
run:
5955
|
6056
latest_nightly_webdriver=$(./scripts/latest-nightly-version.sh rubygems selenium-webdriver)
6157
cd examples/ruby
@@ -66,7 +62,7 @@ jobs:
6662
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6763
- name: Install Gems Nightly Windows
6864
if: matrix.release == 'nightly' && matrix.os == 'windows-latest'
69-
run:
65+
run:
7066
|
7167
$latest_nightly_webdriver = ./scripts/latest-nightly-version.ps1 rubygems selenium-webdriver
7268
cd examples/ruby
@@ -84,14 +80,6 @@ jobs:
8480
with:
8581
distribution: 'temurin'
8682
java-version: 11
87-
- name: Install and Configure Safari and WebDriver
88-
if: matrix.os == 'macos-latest'
89-
run: |
90-
# Check if safaridriver exists
91-
if [[ ! -f "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" ]]; then
92-
echo "safaridriver not found. Exiting."
93-
exit 1
94-
fi
9583
- name: Run tests
9684
uses: nick-invision/retry@v3.0.0
9785
with:

examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,18 @@ public void setPageLoadStrategyNone() {
4747
driver.quit();
4848
}
4949
}
50+
51+
@Test
52+
public void setAcceptInsecureCerts() {
53+
ChromeOptions chromeOptions = new ChromeOptions();
54+
chromeOptions.setAcceptInsecureCerts(true);
55+
WebDriver driver = new ChromeDriver(chromeOptions);
56+
try {
57+
// Navigate to Url
58+
driver.get("https://selenium.dev");
59+
} finally {
60+
driver.quit();
61+
}
62+
}
5063
}
5164

examples/ruby/spec/browsers/safari_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
describe 'Service' do
1414
let(:directory) { "#{Dir.home}/Library/Logs/com.apple.WebDriver/*" }
1515

16-
it 'enable logs' do
16+
it 'enables logs' do
1717
original_count = Dir[directory].length
1818
service = Selenium::WebDriver::Service.safari
1919

@@ -31,10 +31,12 @@
3131
}.to raise_error(Selenium::WebDriver::Error::WebDriverError, /Safari Service does not support setting log output/)
3232
end
3333
end
34+
end
3435

36+
RSpec.describe 'Safari Technology Preview', skip: "This test is being skipped as GitHub Actions have no support for Safari Technology Preview" do
3537
it 'sets the technology preview' do
3638
Selenium::WebDriver::Safari.technology_preview!
3739
local_driver = Selenium::WebDriver.for :safari
3840
expect(local_driver.capabilities.browser_name).to eq 'Safari Technology Preview'
3941
end
40-
end
42+
end

0 commit comments

Comments
 (0)