jeudi 5 novembre 2020

Find element by ID testing with detox - React Native

I am trying to test that an specific ID has certain attributes but I haven’t succeeded finding it. Instead, it finds many others id with the same attributes which tells me that its not stopping in the ID I am leading the test to stop. Also, I couldn’t find a guide for testing with detox that is clear for to start with it

```it("is expected to have elements identifiable by testID", async () => {
await expect(element(by.id("assignment-36"))).toBeVisible();
await expect(element(by.label("Build a Web page"))).toBeVisible();
await expect(element(by.label("Points: 320"))).toBeVisible();````

But the error that I get is:


    Test Failed: Multiple elements found for “MATCHER(label == “Points: 320”)”
    TIP: To print view hierarchy on failed actions/matches, use log-level verbose or higher.```

Aucun commentaire:

Enregistrer un commentaire