-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi,
Im trying to run the example using selenium webdriver (JS/TS) and use the graphQL API for that. First I create a webdriver instance similar to your java code. Then I run the following code to set things up:
const visualConfig: VisualConfig = {
region: "eu",
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY
};
const api = getApi(visualConfig);
const build = await api.graphql.createBuild("Check Inventory");
console.info(`created build ${build.name}(${build.id})`);
const visual = new SauceVisualService();
const sessionId = (await driver.getSession()).getId();
const loginPage = new LoginPage(driver);
const inventoryPage = new InventoryPage(driver);
await loginPage.open();
I can see on saucelabs.com that the build was started successfully. I now try to get the metadata from the build:
const session = await api.graphql.webdriverSessionFromArchive({
sessionId,
jobId,
});But then I run into this error:
file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/errors/index.ts:97
super(errorMessage);
^
ApolloError: [trace/span=7cc193f9d78897b0523a969a84aa7978/979ec5c33fce66c7] Failed to fetch job meta info: Not Found
at new ApolloError (file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/errors/index.ts:97:5)
at file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/core/QueryManager.ts:1146:36
at both (file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/utilities/observables/asyncMap.ts:31:30)
at file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/utilities/observables/asyncMap.ts:20:47
at new Promise (<anonymous>)
at Object.then (file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/utilities/observables/asyncMap.ts:20:16)
at Object.next (file:///Users/xyz/git/visual-examples/wd-js/node_modules/@apollo/src/utilities/observables/asyncMap.ts:32:39)
at notifySubscription (/Users/xyz/git/visual-examples/wd-js/node_modules/zen-observable/lib/Observable.js:135:18)
at onNotify (/Users/xyz/git/visual-examples/wd-js/node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.next (/Users/xyz/git/visual-examples/wd-js/node_modules/zen-observable/lib/Observable.js:235:7) {
graphQLErrors: [
{
message: '[trace/span=7cc193f9d78897b0523a969a84aa7978/979ec5c33fce66c7] Failed to fetch job meta info: Not Found',
locations: [Array],
path: [Array]
}
],
protocolErrors: [],
clientErrors: [],
networkError: null,
extraInfo: undefined
}
Process exited with code 1
Is the required sessionId not webdrivers session id? Where can I get it from? 🤔
Thanks!
Metadata
Metadata
Assignees
Labels
No labels