How do I determine which platform a specific detox test is running on?

1.5k Views Asked by At

When using detox matcher by class name i.e. by.type(className) https://github.com/wix/Detox/blob/master/docs/APIRef.Matchers.md#bytypeclassname

Is it possible to change the classname depending on the platform the test is running on (ios/android)

e.g. element(by.type(className)) becomes:

  • element(by.type('android.widget.ImageView')) on android
  • element(by.type('RCTImageView')) on ios
1

There are 1 best solutions below

0
On BEST ANSWER