How can I create a Custom Helper and use other Helpers inside then?
I would like to use and be able to customize more than one helper in custom_helper. It is possible?
When WebDriverIO is the first one in codecept.json, only the chrome render the url, and if the Nightmare is the first one, the url is rendered only in Electron.
I am create a custom helper and I using something like this:
testCustomHelperWithNightmare(var1, var2) { this.helpers['Nightmare'].fillField(var1, var2); } testCustomHelperWithProtractor(var1, var2) { this.helpers['Protractor'].fillField(var1, var2); }
My codecept.json:
{ "output": "./output", "helpers": { "WebDriverIO": { "url": "http://www.google.com.br", "smartWait": 5000, "browser": "chrome", "keepCookies": true, "keepBrowserState": true, "restart": false, "windowSize": "maximize", "desiredCapabilities": { "acceptSslCerts": true, "javascriptEnabled": true, "acceptInsecureCerts": true, "chrome": { "browserName": "chrome", "name": "TEST_CHROME", "platform": "ANY", "version": "55.0" } } }, "Nightmare": { }, "Protractor": { }, "TestCustomHelper": { "require": "./testcustomhelper_helper.js" } .... }
You are doing something weird. I guess you are trying to execute one test for Electron and for Web, right? Please tell what you are trying to do so I could give you any advice
I'm trying to execute tests for firefox only, I would like to be able to create custom functions in my custom helper using the base of any helper.
@BrunoExterckotter Is this something you are still interested in? If not I'll close the ticket as it is not a common use case.