Skip to content

Commit

Permalink
Merge branch 'trunk' into dotnet-test-debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
RenderMichael authored Nov 17, 2024
2 parents def2d56 + 9054e89 commit 18d7795
Show file tree
Hide file tree
Showing 72 changed files with 1,797 additions and 319 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,16 @@ jobs:
- browser: safari
os: macos
- browser: chrome
os: macos
os: ubuntu
- browser: edge
os: ubuntu
- browser: firefox
os: ubuntu
with:
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
browser: ${{ matrix.browser }}
os: ${{ matrix.os }}
cache-key: py-browser-${{ matrix.browser }}
run: bazel test --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:common-${{ matrix.browser }}-bidi
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
2 changes: 2 additions & 0 deletions .skipped-tests
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
-//py:test-chrome-test/selenium/webdriver/chrome/chrome_launcher_tests.py
-//py:test-chrome-test/selenium/webdriver/chrome/chrome_service_tests.py
-//py:test-chrome-test/selenium/webdriver/chrome/proxy_tests.py
-//py:test-edge-test/selenium/webdriver/edge/edge_launcher_tests.py
-//py:test-edge-test/selenium/webdriver/edge/edge_service_tests.py
-//rb/spec/integration/selenium/webdriver/chrome:service-chrome
-//rb/spec/integration/selenium/webdriver/chrome:service-chrome-bidi
-//rb/spec/integration/selenium/webdriver/chrome:service-chrome-remote
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ Run unit tests with:
bazel test //py:unit
```

To run common tests with a specific browser:

```sh
bazel test //py:common-<browsername>
```

To run common tests with a specific browser (include BiDi tests):

```sh
bazel test //py:common-<browsername>-bidi
```

To run tests with a specific browser:

```sh
Expand Down
6 changes: 5 additions & 1 deletion dotnet/src/webdriver/DefaultFileDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
// under the License.
// </copyright>

using System.Diagnostics.CodeAnalysis;

#nullable enable

namespace OpenQA.Selenium
{
/// <summary>
Expand All @@ -31,7 +35,7 @@ public class DefaultFileDetector : IFileDetector
/// </summary>
/// <param name="keySequence">The sequence to test for file existence.</param>
/// <returns>This method always returns <see langword="false"/> in this implementation.</returns>
public bool IsFile(string keySequence)
public bool IsFile([NotNullWhen(true)] string? keySequence)
{
return false;
}
Expand Down
7 changes: 4 additions & 3 deletions dotnet/src/webdriver/DetachedShadowRootException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
Expand All @@ -41,7 +42,7 @@ public DetachedShadowRootException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public DetachedShadowRootException(string message)
public DetachedShadowRootException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public DetachedShadowRootException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public DetachedShadowRootException(string message, Exception innerException)
public DetachedShadowRootException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
6 changes: 4 additions & 2 deletions dotnet/src/webdriver/DevTools/CommandResponseException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

using System;

#nullable enable

namespace OpenQA.Selenium.DevTools
{
/// <summary>
Expand All @@ -39,7 +41,7 @@ public CommandResponseException()
/// Initializes a new instance of the <see cref="CommandResponseException"/> class with the specified message.
/// </summary>
/// <param name="message">The message of the exception.</param>
public CommandResponseException(string message)
public CommandResponseException(string? message)
: base(message)
{
}
Expand All @@ -49,7 +51,7 @@ public CommandResponseException(string message)
/// </summary>
/// <param name="message">The message of the exception.</param>
/// <param name="innerException">The inner exception for this exception.</param>
public CommandResponseException(string message, Exception innerException)
public CommandResponseException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
9 changes: 5 additions & 4 deletions dotnet/src/webdriver/DriverServiceNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
/// <summary>
/// The exception that is thrown when an element is not visible.
/// The exception that is thrown when the driver service is not available.
/// </summary>
[Serializable]
public class DriverServiceNotFoundException : WebDriverException
Expand All @@ -41,7 +42,7 @@ public DriverServiceNotFoundException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public DriverServiceNotFoundException(string message)
public DriverServiceNotFoundException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public DriverServiceNotFoundException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public DriverServiceNotFoundException(string message, Exception innerException)
public DriverServiceNotFoundException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
7 changes: 4 additions & 3 deletions dotnet/src/webdriver/ElementClickInterceptedException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
Expand All @@ -41,7 +42,7 @@ public ElementClickInterceptedException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public ElementClickInterceptedException(string message)
public ElementClickInterceptedException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public ElementClickInterceptedException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public ElementClickInterceptedException(string message, Exception innerException)
public ElementClickInterceptedException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
9 changes: 5 additions & 4 deletions dotnet/src/webdriver/ElementNotInteractableException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
/// <summary>
/// The exception that is thrown when an element is not visible.
/// The exception that is thrown when an element is not interactable.
/// </summary>
[Serializable]
public class ElementNotInteractableException : InvalidElementStateException
Expand All @@ -41,7 +42,7 @@ public ElementNotInteractableException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public ElementNotInteractableException(string message)
public ElementNotInteractableException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public ElementNotInteractableException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public ElementNotInteractableException(string message, Exception innerException)
public ElementNotInteractableException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
9 changes: 5 additions & 4 deletions dotnet/src/webdriver/ElementNotSelectableException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
/// <summary>
/// The exception that is thrown when an element is not visible.
/// The exception that is thrown when an element is not selectable.
/// </summary>
[Serializable]
public class ElementNotSelectableException : InvalidElementStateException
Expand All @@ -41,7 +42,7 @@ public ElementNotSelectableException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public ElementNotSelectableException(string message)
public ElementNotSelectableException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public ElementNotSelectableException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public ElementNotSelectableException(string message, Exception innerException)
public ElementNotSelectableException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
7 changes: 4 additions & 3 deletions dotnet/src/webdriver/ElementNotVisibleException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
// </copyright>

using System;
using System.Runtime.Serialization;

#nullable enable

namespace OpenQA.Selenium
{
Expand All @@ -41,7 +42,7 @@ public ElementNotVisibleException()
/// a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public ElementNotVisibleException(string message)
public ElementNotVisibleException(string? message)
: base(message)
{
}
Expand All @@ -54,7 +55,7 @@ public ElementNotVisibleException(string message)
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception,
/// or <see langword="null"/> if no inner exception is specified.</param>
public ElementNotVisibleException(string message, Exception innerException)
public ElementNotVisibleException(string? message, Exception? innerException)
: base(message, innerException)
{
}
Expand Down
Loading

0 comments on commit 18d7795

Please sign in to comment.