Skip to content

Instantly share code, notes, and snippets.

// Assume handle1 and handle2 are valid WebDriver window handles,
// and that an element with id "foo" exists on the page being
// browsed by the window represented by handle1.
driver.switchTo().window(handle1);
WebElement element = driver.findElement(By.cssSelector("#foo"));
driver.switchTo().window(handle2);
// According to a strict reading of the spec, this should throw,
// specifically NoSuchElementException, due to the "get a known
diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js
index d219876..0936a84 100644
--- a/javascript/atoms/dom.js
+++ b/javascript/atoms/dom.js
@@ -740,6 +740,23 @@ bot.dom.getOverflowState = function(elem, opt_region) {
return bot.dom.OverflowState.HIDDEN;
}
+ if (goog.userAgent.IE) {
+ // On IE, if the containing element has scroll bars, the
diff --git a/java/client/test/org/openqa/selenium/environment/BUILD.bazel b/java/client/test/org/openqa/selenium/environment/BUILD.bazel
index 4103bab..b0f085e 100644
--- a/java/client/test/org/openqa/selenium/environment/BUILD.bazel
+++ b/java/client/test/org/openqa/selenium/environment/BUILD.bazel
@@ -11,7 +11,7 @@ java_library(
],
),
data = [
- "webserver/keystore",
+ "//java/client/test/org/openqa/selenium/environment/keystore:keystore",
{
"capabilities": {
"firstMatch": [
{
"browserName": "internet explorer",
"se:ieOptions": {
"ignoreProtectedModeSettings": true
}
}
]
<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver actions: pointer move with origin pointer</title>
<style>
div.solidborder {
border-style: solid;
border-width: 1px;
position: absolute;
top: 80px
left: 10px;
@jimevans
jimevans / help
Last active January 31, 2019 20:04 — forked from kyk4322/help
DataTable dt = new DataTable();
var header = driver.FindElement(By.CssSelector("#gridComponent > div.k-grid-header"));
foreach (var row in header.FindElements(By.TagName("tr")))
{
//Configure Number of Col and row
int cellIndex = 0;
string[] arr = new string[32];
//Get Cell Data
@jimevans
jimevans / html
Last active January 31, 2019 19:57
<table role="grid">
<colgroup>
<col style="width:60px">
<col style="width:80px">
<col style="width:130px;">
<col style="width:300px;">
<col>
<col>
<col style="width:200px;">
<col style="width:180px">
DataTable dt = new DataTable();
//Adding Number of Col of Data Output
string Header = driver.FindElement(By.CssSelector("#gridComponent > div.k-grid-header > div > table > thead > tr")).Text;
// Get rows strings
foreach (string row in Header.Split('\r'))
{
DataRow dataRow = dt.NewRow();
}
var table = driver.FindElement(By.CssSelector("#gridComponent");
foreach (var row in table.FindElements(By.TagName("tr")))
{
int cellIndex = 0;
string arr[] = new string[11];
foreach (var cell in row.FindElements(By.TagName("td")))
{
string cellValue = "";
Console.WriteLine(cell);
@jimevans
jimevans / frameContent.html
Last active January 15, 2019 20:46
Firefox/Geckodriver frame navigation test
<html>
<head>
<title>Frame Test Frame Content Page</title>
</head>
<body>
<a href="landingPage.html" id="top" target="_top">Click to navigate</a>
</body>
</html>