Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions java/browsers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ chromedriver_jvm_flags = select({
"//conditions:default": [],
})

chromedriver_beta_jvm_flags = select({
"@selenium//common:use_pinned_linux_chrome": [
"-Dwebdriver.chrome.driver=$(location @linux_beta_chromedriver//:chromedriver)",
],
"@selenium//common:use_pinned_macos_chrome": [
"-Dwebdriver.chrome.driver=$(location @mac_beta_chromedriver//:chromedriver)",
],
"//conditions:default": [],
})

chrome_jvm_flags = select({
"@selenium//common:use_pinned_linux_chrome": [
"-Dwebdriver.chrome.binary=$(location @linux_chrome//:chrome-linux64/chrome)",
Expand All @@ -26,6 +36,24 @@ chrome_jvm_flags = select({
"//conditions:default": [],
}) + chromedriver_jvm_flags

chrome_beta_jvm_flags = select({
"@selenium//common:use_pinned_linux_chrome": [
"-Dwebdriver.chrome.binary=$(location @linux_beta_chrome//:chrome-linux64/chrome)",
],
"@selenium//common:use_pinned_macos_chrome": [
"-Dwebdriver.chrome.binary=$(location @mac_beta_chrome//:Chrome.app)/Contents/MacOS/Chrome",
],
"@selenium//common:use_local_chromedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
],
"//conditions:default": [],
}) + chromedriver_beta_jvm_flags

edgedriver_jvm_flags = select({
"@selenium//common:use_pinned_linux_edge": [
"-Dwebdriver.edge.driver=$(location @linux_edgedriver//:msedgedriver)",
Expand Down
8 changes: 8 additions & 0 deletions java/private/selenium_test.bzl
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
load(
"//common:browsers.bzl",
"COMMON_TAGS",
"chrome_beta_data",
"chrome_data",
"edge_data",
"firefox_beta_data",
"firefox_data",
)
load(
"//java:browsers.bzl",
"chrome_beta_jvm_flags",
"chrome_jvm_flags",
"edge_jvm_flags",
"firefox_beta_jvm_flags",
Expand All @@ -24,6 +26,12 @@ BROWSERS = {
"data": chrome_data,
"tags": COMMON_TAGS + ["chrome"],
},
"chrome-beta": {
"deps": ["//java/src/org/openqa/selenium/chrome"],
"jvm_flags": ["-Dselenium.browser=chrome"] + chrome_beta_jvm_flags,
"data": chrome_beta_data,
"tags": COMMON_TAGS + ["chrome", "chrome-beta"],
},
"edge": {
"deps": ["//java/src/org/openqa/selenium/edge"],
"jvm_flags": ["-Dselenium.browser=edge"] + edge_jvm_flags,
Expand Down