Skip to content

Commit f2c0cf5

Browse files
committed
2 parents 75243dd + 2883baf commit f2c0cf5

File tree

41 files changed

+3072
-220
lines changed

Some content is hidden

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

41 files changed

+3072
-220
lines changed

common/src/web/click_tests/overlapping_elements.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,27 @@
55
<style>
66
#under {
77
position: absolute;
8-
top: 20;
9-
left: 20;
8+
top: 20px;
9+
left: 20px;
1010
width: 100px;
1111
height: 100px;
1212
background-color: white;
1313
}
1414

15+
#partially_under {
16+
position: absolute;
17+
top: 20px;
18+
left: 10px;
19+
width: 100px;
20+
height: 100px;
21+
background-color: blue;
22+
opacity: 0.5;
23+
}
24+
1525
#over {
1626
position: absolute;
17-
top: 20;
18-
left: 20;
27+
top: 20px;
28+
left: 20px;
1929
width: 100px;
2030
height: 100px;
2131
background-color: red;
@@ -30,6 +40,7 @@
3040
</head>
3141
<body id="body">
3242
<div id="under"><p id="contents">Hello</p></div>
43+
<div id="partially_under"><p id="other_contents">Hello</p></div>
3344
<div id="over"></div>
3445
<div id="log">
3546
<p>Log:<p>

java/client/src/org/openqa/selenium/htmlunit/HtmlUnitDriver.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,12 +1102,12 @@ public WebElement findElementByName(String name) {
11021102
}
11031103

11041104
@Override
1105-
public List<WebElement> findElementsByName(String using) {
1105+
public List<WebElement> findElementsByName(String name) {
11061106
if (!(lastPage() instanceof HtmlPage)) {
11071107
return new ArrayList<>();
11081108
}
11091109

1110-
List<DomElement> allElements = ((HtmlPage) lastPage()).getElementsByName(using);
1110+
List<DomElement> allElements = ((HtmlPage) lastPage()).getElementsByName(name);
11111111
return convertRawHtmlElementsToWebElements(allElements);
11121112
}
11131113

@@ -1126,12 +1126,16 @@ public WebElement findElementByTagName(String name) {
11261126
}
11271127

11281128
@Override
1129-
public List<WebElement> findElementsByTagName(String using) {
1129+
public List<WebElement> findElementsByTagName(String name) {
1130+
if ("".equals(name)) {
1131+
throw new InvalidSelectorException("Unable to locate element by xpath for " + lastPage());
1132+
}
1133+
11301134
if (!(lastPage() instanceof HtmlPage)) {
11311135
return new ArrayList<>();
11321136
}
11331137

1134-
NodeList allElements = ((HtmlPage) lastPage()).getElementsByTagName(using);
1138+
NodeList allElements = ((HtmlPage) lastPage()).getElementsByTagName(name);
11351139
List<WebElement> toReturn = new ArrayList<>(allElements.getLength());
11361140
for (int i = 0; i < allElements.getLength(); i++) {
11371141
Node item = allElements.item(i);

java/client/src/org/openqa/selenium/os/ExecutableFinder.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public String find(String named) {
5454
return named;
5555
}
5656

57+
if (Platform.getCurrent().is(Platform.WINDOWS)) {
58+
file = new File(named + ".exe");
59+
if (canExecute(file)) {
60+
return named + ".exe";
61+
}
62+
}
63+
5764
addPathFromEnvironment();
5865
if (Platform.getCurrent().is(Platform.MAC)) {
5966
addMacSpecificPath();

java/client/test/org/openqa/selenium/PageLoadingTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ public void testShouldThrowIfUrlIsMalformed() {
224224
driver.get("www.test.com");
225225
}
226226

227+
@Ignore(value = {IE, SAFARI, PHANTOMJS})
228+
@Test(expected = WebDriverException.class)
229+
@NeedsFreshDriver
230+
public void testShouldThrowIfUrlIsMalformedInPortPart() {
231+
assumeFalse("Fails in Sauce Cloud", SauceDriver.shouldUseSauce());
232+
driver.get("http://localhost:3001bla");
233+
}
234+
227235
@Ignore(value = {SAFARI, MARIONETTE}, issues = {4062})
228236
@Test
229237
public void testShouldReturnWhenGettingAUrlThatDoesNotConnect() {

java/client/test/org/openqa/selenium/TypingTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ public void canSafelyTypeOnElementThatIsRemovedFromTheDomOnKeyPress() {
695695
}
696696

697697
@Test
698+
@Ignore(value = {HTMLUNIT}, reason = "Failed with JS enabled, passed otherwise")
698699
@NotYetImplemented({CHROME})
699700
public void canClearNumberInputAfterTypingInvalidInput() {
700701
driver.get(pages.formPage);

java/server/src/org/openqa/grid/common/RegistrationRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ private void loadFromCommandLine(String[] args) {
465465
configuration.put(CLEAN_UP_CYCLE, Integer.parseInt(helper.getParamValue("-cleanUpCycle")));
466466
}
467467
if (helper.isParamPresent("-timeout")) {
468-
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")));
468+
configuration.put(TIME_OUT, Integer.parseInt(helper.getParamValue("-timeout")) * 1000);
469469
}
470470
if (helper.isParamPresent("-browserTimeout")) {
471471
configuration.put(BROWSER_TIME_OUT, Integer.parseInt(helper.getParamValue("-browserTimeout")));

java/server/src/org/openqa/grid/internal/BaseRemoteProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public BaseRemoteProxy(RegistrationRequest request, Registry registry) {
144144

145145
maxConcurrentSession = getConfigInteger(RegistrationRequest.MAX_SESSION);
146146
cleanUpCycle = getConfigInteger(RegistrationRequest.CLEAN_UP_CYCLE);
147-
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT) * 1000;
147+
timeOutMs = getConfigInteger(RegistrationRequest.TIME_OUT);
148148
statusCheckTimeout = getConfigInteger(RegistrationRequest.STATUS_CHECK_TIMEOUT);
149149

150150
List<DesiredCapabilities> capabilities = request.getCapabilities();

java/server/src/org/openqa/selenium/server/SeleniumServer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,6 @@ public static RemoteControlConfiguration parseLauncherOptions(String[] args) {
10221022
configuration.setDebugURL(getArg(args, ++i));
10231023
} else if ("-timeout".equalsIgnoreCase(arg)) {
10241024
configuration.setTimeoutInSeconds(Integer.parseInt(getArg(args, ++i)));
1025-
} else if ("-browserTimeout".equalsIgnoreCase(arg)) {
1026-
configuration.setBrowserTimeoutInMs(Integer.parseInt(getArg(args, ++i)));
10271025
} else if ("-jettyThreads".equalsIgnoreCase(arg)) {
10281026
int jettyThreadsCount = Integer.parseInt(getArg(args, ++i));
10291027

java/server/test/org/openqa/grid/internal/BaseRemoteProxyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void timeouts() {
147147
RegistrationRequest req = RegistrationRequest.build("-role", "webdriver","-"+RegistrationRequest.REMOTE_HOST, remoteHost,"-"+RegistrationRequest.ID, "abc", "-timeout", "23", "-browserTimeout", "12","-host","localhost");
148148
req.getConfiguration().put(RegistrationRequest.PROXY_CLASS, null);
149149
RemoteProxy p = BaseRemoteProxy.getNewInstance(req, registry);
150-
assertEquals(23, p.getTimeOut());
150+
assertEquals(23000, p.getTimeOut());
151151
}
152152

153153

javascript/atoms/test/history_test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767

6868
function setUpPage() {
69-
goog.testing.TestCase.getActiveTestCase().promiseTimeout = 10000; // 10s
69+
goog.testing.TestCase.getActiveTestCase().promiseTimeout = 30000; // 30s
7070
}
7171

7272
function setUp() {

0 commit comments

Comments
 (0)