Skip to content

Commit e211eba

Browse files
authored
Merge branch 'trunk' into trunk
2 parents 167d479 + df10d88 commit e211eba

File tree

126 files changed

+2680
-866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2680
-866
lines changed

.github/workflows/calibreapp-image-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
if: |
5050
github.event_name != 'pull_request' &&
5151
steps.calibre.outputs.markdown != ''
52-
uses: peter-evans/create-pull-request@v6
52+
uses: peter-evans/create-pull-request@v7
5353
with:
5454
title: Auto Compress Images
5555
branch-suffix: timestamp

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
deploy:
1010
if: contains(toJson(github.event.commits), '[deploy site]') == true
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout repo
1414
uses: actions/checkout@v4

.github/workflows/dotnet-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ jobs:
4848
if: matrix.release == 'stable'
4949
uses: actions/setup-dotnet@v4
5050
with:
51-
dotnet-version: 6.x
51+
dotnet-version: 8.x
5252
- name: Set up .Net Nightly
5353
if: matrix.release == 'nightly'
5454
uses: actions/setup-dotnet@v4
5555
with:
56-
dotnet-version: 6.x
56+
dotnet-version: 8.x
5757
source-url: https://nuget.pkg.github.com/seleniumhq/index.json
5858
env:
5959
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/java-examples.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ jobs:
6767
command: |
6868
pip install yq
6969
xml_content=$(curl -sf https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/)
70-
latest_snapshot=$(echo $xml_content | xq '.content.data."content-item"' | jq -r .text)
71-
echo $latest_snapshot
70+
latest_snapshot=$(echo "$xml_content" | xq '.content.data."content-item"' | jq -r 'sort_by(.lastModified) | last | .text')
71+
echo "Latest Selenium Snapshot: $latest_snapshot"
7272
cd examples/java
7373
mvn -B -U test -Dselenium.version="$latest_snapshot"
7474
@@ -81,7 +81,7 @@ jobs:
8181
command: |
8282
pip install yq
8383
$xml_content = Invoke-WebRequest -Uri "https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/"
84-
$latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r .text
85-
Write-Output $latest_snapshot
84+
$latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r 'sort_by(.lastModified) | last | .text'
85+
Write-Output "Latest Selenium Snapshot: $latest_snapshot"
8686
cd examples/java
8787
mvn -B -U test "-Dselenium.version=$latest_snapshot"

.github/workflows/label-commenter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
comment:
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-24.04
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Label Commenter

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test_build:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout repo
1616
uses: actions/checkout@v4

.gitpod.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
tasks:
22
- name: Install Hugo, init submodules and start website
33
init: |
4-
curl -LO https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_extended_0.110.0_linux-amd64.deb && \
5-
sudo dpkg -i hugo_extended_0.110.0_linux-amd64.deb && \
6-
sudo rm hugo_extended_0.110.0_linux-amd64.deb
4+
curl -LO https://github.com/gohugoio/hugo/releases/download/v0.125.4/hugo_extended_0.125.4_linux-amd64.deb && \
5+
sudo dpkg -i hugo_extended_0.125.4_linux-amd64.deb && \
6+
sudo rm hugo_extended_0.125.4_linux-amd64.deb
77
command: |
88
cd website_and_docs
9-
hugo server --baseUrl $(gp url 1313) --appendPort=false
9+
hugo server --baseURL $(gp url 1313) --appendPort=false
1010
1111
# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
1212
ports:

examples/dotnet/SeleniumDocs/BaseTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class BaseTest
1717
protected IWebDriver driver;
1818
protected Uri GridUrl;
1919
private Process _webserverProcess;
20-
private const string ServerJarName = "selenium-server-4.23.0.jar";
20+
private const string ServerJarName = "selenium-server-4.25.0.jar";
2121
private static readonly string BaseDirectory = AppContext.BaseDirectory;
2222
private const string RelativePathToGrid = "../../../../../";
2323
private readonly string _examplesDirectory = Path.GetFullPath(Path.Combine(BaseDirectory, RelativePathToGrid));

examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
using OpenQA.Selenium;
77
using OpenQA.Selenium.DevTools;
88
using System.Linq;
9+
910
using System.Threading;
10-
using OpenQA.Selenium.DevTools.V127.Browser;
11-
using OpenQA.Selenium.DevTools.V127.Network;
12-
using OpenQA.Selenium.DevTools.V127.Performance;
11+
using OpenQA.Selenium.DevTools.V129.Browser;
12+
using OpenQA.Selenium.DevTools.V129.Network;
13+
using OpenQA.Selenium.DevTools.V129.Performance;
14+
1315

1416

1517
namespace SeleniumDocs.BiDi.CDP
@@ -20,7 +22,7 @@ public class NetworkTest : BaseTest
2022
[TestInitialize]
2123
public void Startup()
2224
{
23-
StartDriver("127");
25+
StartDriver("129");
2426
}
2527

2628
[TestMethod]
@@ -113,9 +115,9 @@ public async Task PerformanceMetrics()
113115
driver.Url = "https://www.selenium.dev/selenium/web/frameset.html";
114116

115117
var session = ((IDevTools)driver).GetDevToolsSession();
116-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V127.DevToolsSessionDomains>();
118+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V129.DevToolsSessionDomains>();
117119

118-
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V127.Performance.EnableCommandSettings());
120+
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V129.Performance.EnableCommandSettings());
119121
var metricsResponse =
120122
await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
121123
new GetMetricsCommandSettings()
@@ -134,8 +136,8 @@ await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
134136
public async Task SetCookie()
135137
{
136138
var session = ((IDevTools)driver).GetDevToolsSession();
137-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V127.DevToolsSessionDomains>();
138-
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V127.Network.EnableCommandSettings());
139+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V129.DevToolsSessionDomains>();
140+
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V129.Network.EnableCommandSettings());
139141

140142
var cookieCommandSettings = new SetCookieCommandSettings
141143
{
Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,74 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
19+
using System;
120
using Microsoft.VisualStudio.TestTools.UnitTesting;
21+
using OpenQA.Selenium;
22+
using OpenQA.Selenium.Chrome;
23+
using System.Collections.Generic;
224

325
namespace SeleniumDocs.Interactions
426
{
5-
[TestClass]
6-
public class FramesTest : BaseTest
27+
[TestClass]
28+
public class FramesTest
729
{
30+
[TestMethod]
31+
public void TestFrames()
32+
{
33+
WebDriver driver = new ChromeDriver();
34+
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(500);
35+
36+
// Navigate to Url
37+
driver.Url= "https://www.selenium.dev/selenium/web/iframes.html";
38+
//switch To IFrame using Web Element
39+
IWebElement iframe = driver.FindElement(By.Id("iframe1"));
40+
//Switch to the frame
41+
driver.SwitchTo().Frame(iframe);
42+
Assert.AreEqual(true, driver.PageSource.Contains("We Leave From Here"));
43+
//Now we can type text into email field
44+
IWebElement emailE = driver.FindElement(By.Id("email"));
45+
emailE.SendKeys("admin@selenium.dev");
46+
emailE.Clear();
47+
driver.SwitchTo().DefaultContent();
48+
49+
50+
//switch To IFrame using name or id
51+
driver.FindElement(By.Name("iframe1-name"));
52+
//Switch to the frame
53+
driver.SwitchTo().Frame(iframe);
54+
Assert.AreEqual(true, driver.PageSource.Contains("We Leave From Here"));
55+
IWebElement email = driver.FindElement(By.Id("email"));
56+
//Now we can type text into email field
57+
email.SendKeys("admin@selenium.dev");
58+
email.Clear();
59+
driver.SwitchTo().DefaultContent();
60+
61+
62+
//switch To IFrame using index
63+
driver.SwitchTo().Frame(0);
64+
Assert.AreEqual(true, driver.PageSource.Contains("We Leave From Here"));
65+
66+
//leave frame
67+
driver.SwitchTo().DefaultContent();
68+
Assert.AreEqual(true, driver.PageSource.Contains("This page has iframes"));
69+
70+
//quit the browser
71+
driver.Quit();
72+
}
873
}
974
}

0 commit comments

Comments
 (0)