New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Selenide driver #801

Merged
merged 36 commits into from Sep 25, 2018

Conversation

Projects
None yet
3 participants
@asolntsev
Copy link
Contributor

asolntsev commented Sep 6, 2018

Proposed changes

Add non-static variant of $. It

  1. makes possible to open 2+ browsers in one test
  2. (in future) allows to use different configurations in parallel tests
  3. makes Selenide own code cleaner and tests simpler

See feature request #354

Checklist

  • Checkstyle and unit tests pass locally with my changes by running gradle check chrome htmlunit command
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@asolntsev asolntsev self-assigned this Sep 6, 2018

@asolntsev asolntsev added this to the 5.0.0 milestone Sep 6, 2018

@asolntsev asolntsev force-pushed the selenide-driver branch 2 times, most recently from 2b6a401 to 95fdb05 Sep 7, 2018

@rosolko rosolko changed the title Selenide driver WIP: Selenide driver Sep 13, 2018

@asolntsev asolntsev force-pushed the selenide-driver branch 3 times, most recently from fbc1c13 to 672dd89 Sep 14, 2018

@rosolko rosolko referenced this pull request Sep 20, 2018

Closed

selenide config added #764

2 of 3 tasks complete
@rosolko

This comment has been minimized.

Copy link
Collaborator

rosolko commented Sep 20, 2018

Linked with #763

@asolntsev asolntsev force-pushed the selenide-driver branch 2 times, most recently from ba08e31 to 2d16d2b Sep 20, 2018

asolntsev added some commits Aug 29, 2018

#354 move part of code from WebDriverContainer to SelenideDriver
* SelenideDriver doesn't use Threads. It only contains WebDriver and SelenideProxy.
* WebDriverContainer holds instances of SelenideDriver in ThreadLocal.
#354 remove dependency WebDriverBinaryManager -> WebDriverRunner
* also move part of code from WebDriverFactory to a smaller class BrowserResizer (for lesser Fan-Out complexity)
* also inline method Describe.describe(WebDriver) (for lesser Fan-Out complexity)
#354 move browser-related constants from WebDriverRunner to Browsers
to allow removing all dependencies on WebDriverRunner static methods from Selenide code
#354 avoid using static methods WebDriverRunner.* and Selenide.* insi…
…de Selenide code

* pass Context(WebDriver, SelenideProxyServer) as a parameter everywhere
* move "static" classes like WebDriverRunner and Selenide to a separate module to guarantee that they are not used inside Selenide code
#354 make SelenideDriver implement Context
...to make opening a browser a "lazy" operation (see LazyEvaluationTest)
hold only one instance of ScreenShotLaboratory
...because it has a state (counter).

This code should be redesigned anyway
speed up the test
it lasted 3 seconds, even though Waiter.sleep was mocked.
should not shutdown proxy server if it's already stopped
.. to avoid useless warnings in console
#354 move driver+proxy logic from SelenideDriver to a smaller class D…
…river

also use Driver class instead of Context (this is essentially the same)
five tests even more memory
it seems that 256mb was not enough for FireFox on TravisCI

@asolntsev asolntsev force-pushed the selenide-driver branch from 6e64f31 to 9d1f968 Sep 22, 2018

@asolntsev asolntsev force-pushed the selenide-driver branch from eacd080 to fe4413b Sep 22, 2018

@asolntsev asolntsev force-pushed the selenide-driver branch from 700a31b to b69a350 Sep 22, 2018

@admizh

This comment has been minimized.

Copy link
Contributor

admizh commented Sep 24, 2018

wow! Thank you @asolntsev #252 , winter is coming

#354 convert (part of) integration tests to non-static form
... and move others to `statics` module

@asolntsev asolntsev force-pushed the selenide-driver branch from 1ae0f79 to 9486fd9 Sep 25, 2018

@asolntsev asolntsev merged commit a8b19f9 into master Sep 25, 2018

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@asolntsev asolntsev deleted the selenide-driver branch Sep 25, 2018

@asolntsev

This comment has been minimized.

Copy link
Contributor

asolntsev commented Sep 25, 2018

Wuhuuu!

We did it. Merged to master. The biggest refactoring ever.

@rosolko

This comment has been minimized.

Copy link
Collaborator

rosolko commented Sep 25, 2018

@asolntsev I think that we can clear backlog now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment