Skip to content

Commit 6b1a6fd

Browse files
authored
Merge branch 'trunk' into js-bidi-storage
2 parents 69a9970 + 8f09638 commit 6b1a6fd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

rb/lib/selenium/webdriver/remote/bridge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def add_cookie(cookie)
323323
end
324324

325325
def delete_cookie(name)
326-
raise ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.strip.empty?
326+
raise ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.to_s.strip.empty?
327327

328328
execute :delete_cookie, name: name
329329
end

rb/spec/integration/selenium/webdriver/manager_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ module WebDriver
268268
expect { driver.manage.delete_cookie(nil) }
269269
.to raise_error(ArgumentError, /Cookie name cannot be null or empty/)
270270
end
271+
272+
it 'allows deleting a cookies using a symbol' do
273+
driver.manage.add_cookie name: :foo, value: 'bar'
274+
driver.manage.delete_cookie(:foo)
275+
expect(driver.manage.all_cookies).to be_empty
276+
end
271277
end
272278
end # Options
273279
end # WebDriver

rust/tests/browser_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use crate::common::{assert_output, get_selenium_manager, get_stdout};
2020
use exitcode::DATAERR;
2121
use rstest::rstest;
2222
use std::env::consts::OS;
23+
use std::path::Path;
2324

2425
mod common;
2526

@@ -134,7 +135,7 @@ fn invalid_geckodriver_version_test() {
134135
r"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
135136
)]
136137
fn browser_path_test(#[case] os: String, #[case] browser: String, #[case] browser_path: String) {
137-
if OS.eq(&os) {
138+
if OS.eq(&os) && Path::new(&browser_path).exists() {
138139
let mut cmd = get_selenium_manager();
139140
cmd.args(["--browser", &browser, "--browser-path", &browser_path])
140141
.assert()

0 commit comments

Comments
 (0)