Skip to content

Commit

Permalink
[java] Using Selenium Manager for Java tests
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Feb 17, 2023
1 parent b1300a6 commit 8b4b818
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
6 changes: 3 additions & 3 deletions common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ alias(
config_setting(
name = "use_local_chromedriver",
flag_values = {
"@local_drivers//:use_chromedriver": "true",
"@local_drivers//:use_chromedriver": "false",
":pin_browsers": "false",
},
)
Expand All @@ -68,7 +68,7 @@ alias(
config_setting(
name = "use_local_geckodriver",
flag_values = {
"@local_drivers//:use_geckodriver": "true",
"@local_drivers//:use_geckodriver": "false",
":pin_browsers": "false",
},
)
Expand All @@ -81,7 +81,7 @@ alias(
config_setting(
name = "use_local_msedgedriver",
flag_values = {
"@local_drivers//:use_msedgedriver": "true",
"@local_drivers//:use_msedgedriver": "false",
":pin_browsers": "false",
},
)
Expand Down
18 changes: 6 additions & 12 deletions java/browsers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ chrome_jvm_flags = select({
"-Dwebdriver.chrome.driver=$(location @mac_chromedriver//:chromedriver)",
"-Dwebdriver.chrome.binary=$(location @mac_chrome//:Chromium.app)/Contents/MacOS/Chromium",
],
"@selenium//common:use_local_chromedriver": [
"-Dwebdriver.chrome.driver=$(location @selenium//common:chromedriver)",
],
"@selenium//common:use_local_chromedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=true",
"-Dselenium.skiptest=false",
],
}) + select({
"@selenium//common:use_headless_browser": [
Expand All @@ -25,11 +23,9 @@ edge_jvm_flags = select({
"-Dwebdriver.edge.driver=$(location @mac_edgedriver//:msedgedriver)",
"-Dwebdriver.edge.binary=\"$(location @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge\"",
],
"@selenium//common:use_local_msedgedriver": [
"-Dwebdriver.edge.driver=$(location @selenium//common:msedgedriver)",
],
"@selenium//common:use_local_msedgedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=true",
"-Dselenium.skiptest=false",
],
}) + select({
"@selenium//common:use_headless_browser": [
Expand All @@ -47,11 +43,9 @@ firefox_jvm_flags = select({
"-Dwebdriver.gecko.driver=$(location @mac_geckodriver//:geckodriver)",
"-Dwebdriver.firefox.bin=$(location @mac_firefox//:Firefox.app)/Contents/MacOS/firefox",
],
"@selenium//common:use_local_geckodriver": [
"-Dwebdriver.gecko.driver=$(location @selenium//common:geckodriver)",
],
"@selenium//common:use_local_geckodriver": [],
"//conditions:default": [
"-Dselenium.skiptest=true",
"-Dselenium.skiptest=false",
],
}) + select({
"@selenium//common:use_headless_browser": [
Expand Down

0 comments on commit 8b4b818

Please sign in to comment.