nightwatch: how to assert class is visible based on a regex?

Viewed 1112

I use nighwatch to test a react app.

App CSS classes are like .myClass__4RFGCG

I'd like to test

browser.assert.visible(".myClass", "Testing if .myClass renders")

since from what I read regex are not supported, is there another way?

1 Answers

if anyone looking for that:

browser.assert.visible("div[class^= 'myClass']", "")
Related