selenide / selenide

Concise UI Tests with Java!
http://selenide.org
MIT License
1.84k stars 579 forks source link

Integrate Selenide with CDP #1157

Open asolntsev opened 4 years ago

asolntsev commented 4 years ago

The problem

If Selenide could easily call CDP methods, it would allow some new features for Selenide users:

  1. Watch all network requests from browser (e.g. intercept calls to unexpected services)
  2. Mock geolocation (see example)
  3. More examples in Selenoid blog
  4. e.g. https://zhiminzhan.medium.com/selenium-4-chrome-devtools-examples-7b2e81008a46#9955
  5. e.g. https://www.selenium.dev/documentation/webdriver/bidirectional/chrome_devtools/
  6. More examples here: https://github.com/sergueik/selenium_cdp
    1. See discussion here: https://automated-testing.info/t/re-selenide-ustanovit-mobile-simulation-posle-zapuska-brauzera/27469/2
scripnichenko commented 4 years ago

Ideally,

GIVEN I am as a Selenide Test Suite owner (~200 Test cases), AND required to switch between WebDriver and CDP protocols WHEN I do switch THEN I don`t need to re-write tests. AND I can utilize CDP features extending tests.

Note Assume we need to have CDP adaptor alike WDIO has implemented

asolntsev commented 4 years ago

Exactly! This is the plan:

you don`t need to re-write tests.

asolntsev commented 2 years ago

I created a new branch with CDP examples: https://github.com/selenide/selenide/commits/add-cdp-samples

Should probably merged it to master after some time.

razinkovaleksey commented 7 months ago

Any updates or examples in new selenide version ?

asolntsev commented 7 months ago

@razinkovaleksey We created a Pull Request with examples: https://github.com/selenide/selenide/pull/1691/files

It's still not merged, and therefore not released.