Conversation
|
@erwinheitzman thanks for raising the PR. The idea of this recipe project is to have example recipes that are being tested. You see that all examples in here are somewhat connected to a test that runs in CI to ensure that the WebdriverIO examples actually work. Hence I would suggest to only add code samples that we actually have a way to verify that they are working. Wdyt? |
| //... | ||
| user: '<browserstack_username>' || process.env.BROWSERSTACK_USERNAME, | ||
| key: '<browserstack_access_key>' || process.env.BROWSERSTACK_ACCESS_KEY, | ||
| commonCapabilities: { |
There was a problem hiding this comment.
Never seen commonCapabilities, is this new?
| browserName: 'chrome', | ||
| 'custom:caps': { | ||
| // custom configurations | ||
| } |
There was a problem hiding this comment.
| } | |
| } | |
| // ... |
For consistency
| 'custom:caps': { | ||
| // custom configurations | ||
| } | ||
| }] |
There was a problem hiding this comment.
| }] | |
| }] | |
| // ... |
For consistency
| securityToken: "your security token" | ||
| }], | ||
| }) No newline at end of file |
There was a problem hiding this comment.
| securityToken: "your security token" | |
| }], | |
| }) | |
| securityToken: "your security token" | |
| // ... | |
| }], | |
| // ... | |
| }) |
For consistency
| runner: ['browser', { | ||
| // network IP of the machine that runs the WebdriverIO process | ||
| host: 'http://172.168.0.2' | ||
| }] |
There was a problem hiding this comment.
| runner: ['browser', { | |
| // network IP of the machine that runs the WebdriverIO process | |
| host: 'http://172.168.0.2' | |
| }] | |
| // ... | |
| runner: ['browser', { | |
| // network IP of the machine that runs the WebdriverIO process | |
| host: 'http://172.168.0.2' | |
| }], | |
| // ... |
For consistency
| outputDir: 'trace', | ||
| // ... |
There was a problem hiding this comment.
| outputDir: 'trace', | |
| // ... | |
| // ... | |
| outputDir: 'trace', |
For consistency
| browserName, | ||
| 'goog:chromeOptions': { | ||
| // given your wdio.conf.js is in the root directory and your compiled | ||
| // web extension files are located in the `./dist` folder | ||
| args: [`--load-extension=${path.join(__dirname, '..', '..', 'dist')}`] | ||
| } | ||
| }] |
There was a problem hiding this comment.
| browserName, | |
| 'goog:chromeOptions': { | |
| // given your wdio.conf.js is in the root directory and your compiled | |
| // web extension files are located in the `./dist` folder | |
| args: [`--load-extension=${path.join(__dirname, '..', '..', 'dist')}`] | |
| } | |
| }] | |
| browserName, | |
| 'goog:chromeOptions': { | |
| // given your wdio.conf.js is in the root directory and your compiled | |
| // web extension files are located in the `./dist` folder | |
| args: [`--load-extension=${path.join(__dirname, '..', '..', 'dist')}`], | |
| // ... | |
| } | |
| }] | |
| // ... |
For consistency
| // ... | ||
| capabilities: [{ | ||
| browserName, | ||
| 'goog:chromeOptions': { | ||
| extensions: [chromeExtension] | ||
| } | ||
| }] |
There was a problem hiding this comment.
| // ... | |
| capabilities: [{ | |
| browserName, | |
| 'goog:chromeOptions': { | |
| extensions: [chromeExtension] | |
| } | |
| }] | |
| // ... | |
| capabilities: [{ | |
| browserName, | |
| 'goog:chromeOptions': { | |
| extensions: [chromeExtension] | |
| } | |
| }], | |
| // ... |
For consistency
| before: async (capabilities) => { | ||
| const browserName = (capabilities as WebdriverIO.Capabilities).browserName | ||
| if (browserName === 'firefox') { | ||
| const extension = await fs.readFile(extensionPath) | ||
| await browser.installAddOn(extension.toString('base64'), true) | ||
| } | ||
| } |
There was a problem hiding this comment.
| before: async (capabilities) => { | |
| const browserName = (capabilities as WebdriverIO.Capabilities).browserName | |
| if (browserName === 'firefox') { | |
| const extension = await fs.readFile(extensionPath) | |
| await browser.installAddOn(extension.toString('base64'), true) | |
| } | |
| } | |
| before: async (capabilities) => { | |
| const browserName = (capabilities as WebdriverIO.Capabilities).browserName | |
| if (browserName === 'firefox') { | |
| const extension = await fs.readFile(extensionPath) | |
| await browser.installAddOn(extension.toString('base64'), true) | |
| } | |
| }, | |
| // ... |
For consistency
| // ... | ||
| before: () => { | ||
| browser.addCommand('openExtensionPopup', openExtensionPopup) | ||
| } |
There was a problem hiding this comment.
| } | |
| } | |
| // ... |
For consistency
|
@christian-bromann i just realised that if I put these scripts in the main WebdriverIO repo and link to them from the same repo it should probably also work. Let me move them there as it's much better. I didn't take into account the intent/scope of the repo too well, thanks |
|
I think some of these examples could be maybe transformed into executable tests. The test doesn't need to do much other other then run the code involved in a somwhat meaningful way. So maybe we can keep some here that would be valuable but yes, you can also keep them within the core repo when they only have documentation purpose. |
No description provided.