Protractor - Return Operating System

Does anyone know how to get back the operating system using Protractor?

A little context: I need to press a few keys (I think I will use a sequence of actions for this), but since the keyboard is different for MAC and PC, I think I need the if statement to detect m runs the tests. If anyone knows a better way to do this? This is further exacerbated by the fact that the keys are relatively unusual (fn + F10) on MAC and only F10 on PC.

Any help is greatly appreciated!

+3


source to share


1 answer


The protractor runs on node, so you can use the built-in node variable process.platform

.



+3


source







All Articles