I’m using codeceptjs with webdriverIO
I have a framework with 2 different config files ‘codecept.conf’ (for running tests on desktop) and ‘codecept.mobile.conf’ (for running tests on mobile devices)
how it runs?
it runs a scenario which first creates test data on the backend (wordpress) and then validate it on the front-end website
what’s the problem?
the data creation part must only execute on desktop device and not in mobile
what I’m trying to achieve?
I’m looking for a way to execute one scenario (data creation part) in desktop (using ‘codecept.conf’) and another scenario (data validation part) (in the same feature file) in mobile (using ‘codecept.mobile.conf’)
there are some solutions available for Puppeteer e.g. https://github.com/codecept-js/CodeceptJS/pull/1053/files, but apparently they it doesn’t apply to webdriver IO as tests in wdIO are written in feature files and not JS files