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
4 changes: 2 additions & 2 deletions web/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ filegroup(
visibility = [
"//dotnet/test:__subpackages__",
"//java/test/org/openqa/selenium/environment:__pkg__",
"//javascript/node/selenium-webdriver:__pkg__",
"//javascript/selenium-webdriver:__pkg__",
"//py:__pkg__",
"//rb/spec:__subpackages__",
],
Expand All @@ -21,6 +21,6 @@ js_library(
":web",
],
visibility = [
"//javascript/node/selenium-webdriver:__subpackages__",
"//javascript/selenium-webdriver:__subpackages__",
],
)
2 changes: 1 addition & 1 deletion web/bidi/logEntryAdded.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<body>

<h1>Long entry added events</h1>
<h1>Log entry added events</h1>

<button id="consoleLog" onclick="helloWorld()">Click me for console logs</button>

Expand Down
40 changes: 40 additions & 0 deletions web/fedcm/fedcm_async_js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<title>FedCM Example</title>
</head>
<body>
<button id="triggerButton" onclick="triggerFedCm()">Trigger FedCM</button>
<div id="result"></div>

<script>
// Use a relative path for the configURL
let configURL = `http://${location.host}/common/fedcm/config.json`;
console.log(configURL)
let result = null;

async function triggerFedCm() {
console.log("Config URL:", configURL);
try {
let promise = await navigator.credentials.get({
identity: {
providers: [{
configURL: configURL,
clientId: '1',
}]
}
});
result = promise;

console.log("Promised!")
console.log(result)
document.getElementById('result').innerText = JSON.stringify(result);
} catch (error) {
console.error("FedCM Error:", error);
result = { error: error.message };
document.getElementById('result').innerText = JSON.stringify(result);
}
}
</script>
</body>
</html>
5 changes: 3 additions & 2 deletions web/formPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@

<select id="invisible_multi_select" multiple>
<option selected="selected" value="apples" style="opacity: 0;">Apples</option>
<option value="oranges">Oranges</option>
<option selected="selected" value="lemons">Lemons</option>
<option value="pears" style="opacity: 0.0;">Pears</option>
<option value="oranges" style="display: none;">Oranges</option>
<option selected="selected" value="lemons" style="visibility: hidden;">Lemons</option>
</select>

<select name="select-default">
Expand Down
2 changes: 1 addition & 1 deletion web/logEntryAdded.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<body>

<h1>Long entry added events</h1>
<h1>Log entry added events</h1>

<button id="consoleLog" onclick="helloWorld()">Click me for console logs</button>

Expand Down
101 changes: 72 additions & 29 deletions web/relative_locators.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

<html>
<html lang="en">
<head>
<title>Relative Locators</title>
<style>
Expand All @@ -10,57 +9,101 @@
td {
border: solid;
}
.small-rectangle {
#center {
width: 100px;
}
#rectangles {
position: relative;
}
#rectangles div {
position: absolute;
border: 1px solid black;
height: 50px;
width: 50px;
}
#a {
left: 25px;
top: 0;
}
#b {
left: 78px;
top: 30px;
}
#c {
left: 131px;
top: 60px;
}
#d {
left: 0;
top: 53px;
}
#e {
left: 53px;
top: 83px;
}
#f {
left: 106px;
top: 113px;
}
#proximity .small {
border: 1px solid black;
width: 100px;
height: 50px;
margin: 5px 25px;
}
.big-rectangle {
#proximity .big {
border: 1px solid black;
width: 150px;
height: 400px;
height: 400px;
}
#rect3 {
margin: 60px 25px;
}
</style>
</head>
<body>
<h1>Relative Locator Tests</h1>
<p id="above">This text is above.
<p id="mid">This is a paragraph of text in the middle.
<p id="below">This text is below.

<section id="paragraphs">
<p id="above">This text is above.</p>
<p id="mid">This is a paragraph of text in the middle.</p>
<p id="below">This text is below.</p>
</section>

<table>
<tr>
<td id="first">1</td>
<td id="second" style="width: 100px">2</td>
<td id="third">3</td>
<td id="topLeft">1</td>
<td id="top">2</td>
<td id="topRight">3</td>
</tr>
<tr>
<td id="fourth">4</td>
<td id="left">4</td>
<td id="center">5</td>
<td id="sixth">6</td>
<td id="right">6</td>
</tr>
<tr>
<td id="seventh">7</td>
<td id="eighth">8</td>
<td id="ninth">9</td>
<td id="bottomLeft">7</td>
<td id="bottom">8</td>
<td id="bottomRight">9</td>
</tr>
</table>

<div class="small-rectangle" id="rect1">
Rectangle 1
</div>
<div class="big-rectangle" id="rect2">
Rectangle 2, which is near Rectangle 1
</div>
<section id="rectangles">
<div id="a">El-A</div>
<div id="b">El-B</div>
<div id="c">El-C</div>
<div id="d">El-D</div>
<div id="e">El-E</div>
<div id="f">El-F</div>
</section>

<div class="small-rectangle" style="margin:60px 25px" id="rect3">
Rectangle 3
</div>
<div class="big-rectangle" id="rect4">
Rectangle 4, which is not near Rectangle 2 because it is more than 50 px away
</div>
<section id="proximity">
<div class="small" id="rect1">Rectangle 1</div>
<div class="big" id="rect2">Rectangle 2, which is near Rectangle 1</div>
<div class="small" id="rect3">Rectangle 3</div>
<div class="big" id="rect4">
Rectangle 4, which is not near Rectangle 2 because it is more than 50 px away
</div>
</section>

</body>
</html>
Empty file added web/service-worker.js
Empty file.
16 changes: 16 additions & 0 deletions web/service_worker.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>Service Worker Test Page</title>
<script>
if (navigator.serviceWorker) {
navigator.serviceWorker.register("/service-worker.js", { scope: "/" })
.then(() => navigator.serviceWorker.ready)
.then(() => console.debug("[Companion]", "Service worker registered!"));
}
</script>
</head>
<body>
<h1>This page loads a service worker</h1>
</body>
</html>