Conversation
|
I tried to add tests on *DriverService with mocking via mockito for testing passing timeout, but couldn't create correct partial mocks. This tests could be written with JMockit, because it supports mocking/verifying any calls (constructors, static methods). If this dependency could be added, I can write tests (which check that timeout is used in method waitUntilAvailable) for every DriverService. |
|
Please don't add another mocking lib. If you need to mock a constructor you must be doing something wrong :) Or we have already written bad code that should be refactored for better testability. |
|
I didn't add any another mocking tool without approval. I am discussing if test is needed and which test I can add. But in this test there is no big sense, because it checks that the timeout is passed to Builder.createDriverService and can't check that set timeout in Builder is used by DriverService. |
|
We have |
|
A better choice would be |
|
I've now migrated the code in Selenium to use |
|
I made a rebase on my branch, there is no need to change anything, because *DriverService don't use Clock |
|
It has been passed one and a half months. Do we process this pull request and integrate setting timeout of starting browser? |
* Added a basic ServiceBuilder for Internet Explorer Adds it to IE's `Driver` and allows it to be specified with a new `setIeService` in the general `Builder`. Fixes SeleniumHQ#5983 * Added IE service
…ng configs out of JSON files or resources, and initialize new config instances with data loaded from default config resources.
This makes `getHeaders(String)` properly case-insensitive.
Eventually, the goal is to untangle ourselves from Jetty entirely. The first step is to start replacing the test usages with something that doesn't depend on a third party library. Fortunately, since java 6 both OpenJDK and the Oracle JDK have shipped with an HTTP server as part of their own APIs. This has been exposed via a JPMS module, and so it should be safe to rely on since I don't think any of the developers use the IBM JDK for development work.
We have a lot of boiler-plate code. Let's try and bring that down to something sensible, and at the same time standardise how we start new servers.
Configuration is split into two separate layers. The first are implementations of `Config`. These provide raw access to the config options, and can be implemented any way that people choose. The second layer are app-specific views of the `Config`s available. These allow all configuration options to be put into one place, and easily accessed and reasoned about.
…y security warning This code is copied from the SeleniumServer in the current Grid Node. Apparently it's important.
2) Fixing 'host' to be always '0.0.0.0' if not specified explicitly
Those were broken since 1229d40 which changed the upload path
Continuation of 52b969e
Signed-off-by: Alex Rodionov <p0deje@gmail.com>
According to documentation at https://developer.mozilla.org/en-US/docs/Web/API/Window/pageYOffset window.pageYOffset may not return integer value. With the following changes in below we are checking the type of returned object and assigning respectively the value of 'yOffset' Signed-off-by: Alexei Barantsev <barancev@gmail.com>
Signed-off-by: Alexei Barantsev <barancev@gmail.com>
The W3C WebDriver Specification dictates that checking for elements being obscured by other elements should rely on calling elementsFromPoint. However, there is a bug in IE's elementsFromPoint implementation. if two sibling elements have the same z-index, the one specified second in the DOM order is usually on top. The exception is if there is a child element that has a specified z-index greater than the ancestor z-index. The IE elementsFromPoint implementation ignores the child element case, so we have to manually look for child elements that may be rendered on top of the element found outside the element DOM tree of the element we are attempting to interact with.
Continuation of fd52573. This change mimics Java bindings behavior.
…r and rewriting it without reflection.
Removing timeout from FirefoxBinary because it is not used (cherry picked from commit 0e3a915)
…river-service-timeout2 # Conflicts: # java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java
… for: ChromeDriverService.Builder EdgeDriverService.Builder GeckoDriverService.Builder XpiDriverService.Builder InternetExplorerDriverService.Builder OperaDriverService.Builder
… for: SafariDriverService.Builder
|
I've committed tests which verify that timeout is passing to createDriverService for: |
|
Do we process this pull request and integrate setting timeout of starting browser? |
Xin the preceding checkbox, I verify that I have signed the Contributor License AgreementAfter thinking on comments of PR Using timeout from FirefoxBinary inside GeckoDriverService, XpiDriver… #6117 I think that adding configurable timeout into DriverService.Builder is much better solution, because, in this case, custom timeout can be set for any driver. Also because FirefoxBinary.setTimeout was not used at all I removed it.
This change is