Skip to content
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

Example for webdriver selenium JS/TS #33

Open
matzetronic opened this issue Aug 24, 2023 · 1 comment
Open

Example for webdriver selenium JS/TS #33

matzetronic opened this issue Aug 24, 2023 · 1 comment

Comments

@matzetronic
Copy link

matzetronic commented Aug 24, 2023

Hi,
in our enterprise setup we can not use webdriver.io and instead use selenium webdriver for javascript. Can you please provide an example on how to use the new service with selenium webdriver in JS/TS (especially how to configure the capabilities). As an alternative it would be also fine to use the graphql API directly from JS/TS but some examples for that would be also of great help. Thanks!

@FriggaHel
Copy link
Collaborator

Hi @matzetronic !

Currently we don't have an example with Selenium in JS/TS. From a capabilities standpoint, it should not change as the logic occurs in the script running the session not near the part running the browser.

You'll find here the technical documentation of the API and the available methods. Alternatively you can rely on @saucelabs/visual which already deal with this GraphQL connection and the boiler plate part around it.

Lifecycle should be:

  • createBuild to create the Visual Build
  • createSnapshotUpload to get a link where to upload your screenshot.
  • createSnapshot to register the newly uploaded screenshot (+ metadata) to the build
  • finishBuild to mark the build as completed.

I don't have any timeline for more detailed documentation regarding API itself. Same for Selenium Javascript, I don't have any timeline for this integration.

Let me know if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants