In intern.js Leadfoot, how can I determine what device / browser I am running on?

50 views Asked by At

I have a test suite using theintern that I run on a whole array of different browsers and devices via BrowserStack. I would like to be able to take some slightly different actions on mobile vs desktop - is there any way I can include logic to determine what device I'm on when I'm writing my leadfoot code?

1

There are 1 answers

0
jason0x43 On

In a functional test, you can reference information about the current session's environment via

this.remote.session.environment

You can access the session's WebDriver capabilities with

this.remote.session.capabilities