Skip to content

Commit

Permalink
Merge branch 'trunk' into pallavi-getCookieRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
pallavigitwork authored Jan 21, 2025
2 parents 150b92c + a41a4c2 commit c6d198b
Show file tree
Hide file tree
Showing 25 changed files with 131 additions and 153 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ namespace :all do
end

at_exit do
system 'sh', '.git-fixfiles' if File.exist?('.git') && !SeleniumRake::Checks.windows?
system 'sh', '.git-fixfiles' if File.exist?('.git') && SeleniumRake::Checks.linux?
end

def updated_version(current, desired = nil, nightly = nil)
Expand Down
49 changes: 23 additions & 26 deletions common/mirror/selenium
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
[
{
"tag_name": "selenium-4.28.0",
"assets": [
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.28.0/selenium-dotnet-4.28.0.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.28.0/selenium-dotnet-strongnamed-4.28.0.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.28.0/selenium-java-4.28.0.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.28.0/selenium-server-4.28.0.jar"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.28.0/selenium-server-4.28.0.zip"
}
]
},
{
"tag_name": "nightly",
"assets": [
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.28.0-SNAPSHOT.zip"
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.29.0-SNAPSHOT.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.jar"
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.29.0-SNAPSHOT.jar"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.28.0-SNAPSHOT.zip"
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.29.0-SNAPSHOT.zip"
}
]
},
Expand Down Expand Up @@ -929,28 +949,5 @@
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0/selenium-server-4.0.0.zip"
}
]
},
{
"tag_name": "selenium-4.0.0-rc-3",
"assets": [
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-dotnet-4.0.0-rc3.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-dotnet-strongnamed-4.0.0-rc3.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-html-runner-4.0.0-rc-3.jar"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-java-4.0.0-rc-3.zip"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-server-4.0.0-rc-3.jar"
},
{
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-3/selenium-server-4.0.0-rc-3.zip"
}
]
}
]
4 changes: 2 additions & 2 deletions dotnet/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ layout: landingPage
# Welcome to the Selenium .NET API Docs

## Modules
- [Selenium.WebDriver](/webdriver/OpenQA.Selenium.html)
- [Selenium.Support](/support/OpenQA.Selenium.Support.html)
- [Selenium.WebDriver](webdriver/OpenQA.Selenium.html)
- [Selenium.Support](support/OpenQA.Selenium.Support.html)
2 changes: 1 addition & 1 deletion dotnet/selenium-dotnet-version.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD FILE SYNTAX: STARLARK

SE_VERSION = "4.28.0"
SE_VERSION = "4.29.0-nightly202501201850"
ASSEMBLY_VERSION = "4.0.0.0"
SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected void loadSystemProperties() {
@Override
protected List<String> createArgs() {
List<String> args = new ArrayList<>();
args.add(String.format("--port=%d", getPort()));
args.add(String.format(Locale.ROOT, "--port=%d", getPort()));

// Readable timestamp and append logs only work if log path is specified in args
// Cannot use logOutput because goog:loggingPrefs requires --log-path get sent
Expand Down
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/edge/EdgeDriverService.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ protected void loadSystemProperties() {
@Override
protected List<String> createArgs() {
List<String> args = new ArrayList<>();
args.add(String.format("--port=%d", getPort()));
args.add(String.format(Locale.ROOT, "--port=%d", getPort()));

// Readable timestamp and append logs only work if log path is specified in args
// Cannot use logOutput because goog:loggingPrefs requires --log-path get sent
Expand Down
3 changes: 2 additions & 1 deletion java/src/org/openqa/selenium/firefox/GeckoDriverService.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriverException;
Expand Down Expand Up @@ -219,7 +220,7 @@ protected void loadSystemProperties() {
@Override
protected List<String> createArgs() {
List<String> args = new ArrayList<>();
args.add(String.format("--port=%d", getPort()));
args.add(String.format(Locale.ROOT, "--port=%d", getPort()));

int wsPort = PortProber.findFreePort();
args.add(String.format("--websocket-port=%d", wsPort));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriverException;
Expand Down Expand Up @@ -217,7 +218,7 @@ protected void loadSystemProperties() {
@Override
protected List<String> createArgs() {
List<String> args = new ArrayList<>();
args.add(String.format("--port=%d", getPort()));
args.add(String.format(Locale.ROOT, "--port=%d", getPort()));

if (logLevel != null) {
args.add(String.format("--log-level=%s", logLevel));
Expand Down
13 changes: 1 addition & 12 deletions java/src/org/openqa/selenium/remote/service/DriverService.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected Map<String, String> getEnvironment() {
}

protected URL getUrl(int port) throws IOException {
return new URL(String.format("http://localhost:%d", port));
return new URL(String.format(Locale.ROOT, "http://localhost:%d", port));
}

protected Capabilities getDefaultDriverOptions() {
Expand Down Expand Up @@ -505,17 +505,6 @@ public DS build() {
port = PortProber.findFreePort();
}

if (Locale.getDefault(Locale.Category.FORMAT).getLanguage().equals("ar")) {
throw new NumberFormatException(
String.format(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/",
getPort()));
}

if (timeout == null) {
timeout = getDefaultTimeout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,20 @@ void canExecuteCdpCommands() {

@Test
@NoDriverBeforeTest
void shouldThrowNumberFormatException() {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
ChromeDriverService.Builder builder = new ChromeDriverService.Builder();
builder.usingPort(port);

assertThatExceptionOfType(NumberFormatException.class)
.isThrownBy(builder::build)
.withMessage(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/");

Locale.setDefault(Locale.US);
void shouldLaunchSuccessfullyWithArabicDate() {
try {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
ChromeDriverService.Builder builder = new ChromeDriverService.Builder();
builder.usingPort(port);
builder.build();

} catch (Exception e) {
throw e;
} finally {
Locale.setDefault(Locale.US);
}
}
}
33 changes: 15 additions & 18 deletions java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,20 @@ void canExecuteCdpCommands() {

@Test
@NoDriverBeforeTest
void shouldThrowNumberFormatException() {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
EdgeDriverService.Builder builder = new EdgeDriverService.Builder();
builder.usingPort(port);

assertThatExceptionOfType(NumberFormatException.class)
.isThrownBy(builder::build)
.withMessage(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/");

Locale.setDefault(Locale.US);
void shouldLaunchSuccessfullyWithArabicDate() {
try {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
EdgeDriverService.Builder builder = new EdgeDriverService.Builder();
builder.usingPort(port);
builder.build();

} catch (Exception e) {
throw e;
} finally {
Locale.setDefault(Locale.US);
}
}
}
34 changes: 15 additions & 19 deletions java/test/org/openqa/selenium/firefox/FirefoxDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.openqa.selenium.firefox;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
Expand Down Expand Up @@ -273,24 +272,21 @@ void canSetContext() {

@Test
@NoDriverBeforeTest
void shouldThrowNumberFormatException() {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
GeckoDriverService.Builder builder = new GeckoDriverService.Builder();
builder.usingPort(port);

assertThatExceptionOfType(NumberFormatException.class)
.isThrownBy(builder::build)
.withMessage(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/");

Locale.setDefault(Locale.US);
void shouldLaunchSuccessfullyWithArabicDate() {
try {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
GeckoDriverService.Builder builder = new GeckoDriverService.Builder();
builder.usingPort(port);
builder.build();

} catch (Exception e) {
throw e;
} finally {
Locale.setDefault(Locale.US);
}
}

private static class CustomFirefoxProfile extends FirefoxProfile {}
Expand Down
29 changes: 13 additions & 16 deletions java/test/org/openqa/selenium/ie/InternetExplorerDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,21 @@ void testPersistentHoverCanBeTurnedOff() throws Exception {

@Test
@NoDriverBeforeTest
void shouldThrowNumberFormatException() {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);
void shouldLaunchSuccessfullyWithArabicDate() {
try {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
InternetExplorerDriverService.Builder builder = new InternetExplorerDriverService.Builder();
builder.usingPort(port);
int port = PortProber.findFreePort();
InternetExplorerDriverService.Builder builder = new InternetExplorerDriverService.Builder();
builder.usingPort(port);
builder.build();

assertThatExceptionOfType(NumberFormatException.class)
.isThrownBy(builder::build)
.withMessage(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/");

Locale.setDefault(Locale.US);
} catch (Exception e) {
throw e;
} finally {
Locale.setDefault(Locale.US);
}
}

private WebDriver newIeDriver() {
Expand Down
33 changes: 15 additions & 18 deletions java/test/org/openqa/selenium/safari/SafariDriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,20 @@ public void canAttachDebugger() {

@Test
@NoDriverBeforeTest
void shouldThrowNumberFormatException() {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
SafariDriverService.Builder builder = new SafariDriverService.Builder();
builder.usingPort(port);

assertThatExceptionOfType(NumberFormatException.class)
.isThrownBy(builder::build)
.withMessage(
"Couldn't format the port numbers because the System Language is arabic: \""
+ String.format("--port=%d", port)
+ "\", please make sure to add the required arguments \"-Duser.language=en"
+ " -Duser.region=US\" to your JVM, for more info please visit :\n"
+ " https://www.selenium.dev/documentation/webdriver/browsers/");

Locale.setDefault(Locale.US);
void shouldLaunchSuccessfullyWithArabicDate() {
try {
Locale arabicLocale = new Locale("ar", "EG");
Locale.setDefault(arabicLocale);

int port = PortProber.findFreePort();
SafariDriverService.Builder builder = new SafariDriverService.Builder();
builder.usingPort(port);
builder.build();

} catch (Exception e) {
throw e;
} finally {
Locale.setDefault(Locale.US);
}
}
}
2 changes: 1 addition & 1 deletion java/version.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SE_VERSION = "4.28.0"
SE_VERSION = "4.29.0-SNAPSHOT"
TOOLS_JAVA_VERSION = "17"
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ load("//javascript/private:browsers.bzl", "BROWSERS")

npm_link_all_packages(name = "node_modules")

VERSION = "4.28.0"
VERSION = "4.29.0-nightly202501202154"

BROWSER_VERSIONS = [
"v85",
Expand Down
4 changes: 4 additions & 0 deletions javascript/node/selenium-webdriver/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.28.1

- [JS] specify min required node versiton to 18.20.5

## 4.28.0

- Add CDP for Chrome 132 and remove 129
Expand Down
Loading

0 comments on commit c6d198b

Please sign in to comment.