playwright-go icon indicating copy to clipboard operation
playwright-go copied to clipboard

[Feature request] Web first assettions

Open papshmeare opened this issue 3 years ago • 1 comments

I was recommended to file a feature request for what I am surely doing as a hack. I want to wait until a value of a given elements' attribute equals to false. At the moment I awkwardly loop until the condition is met but after reading the documentation about ".waitFor" I am sure there has to be a better way of doing it. Please correct this message if the format of the request is not correct.

     for {
         v, _ := element.GetAttribute("attribute")
         if v != "true" {
             break
         }
     }

papshmeare avatar May 04 '22 19:05 papshmeare

(Note for contributors)

This would be essentially to port this and make it available: https://playwright.dev/docs/test-assertions

Code pointer how it was done in Python: https://github.com/microsoft/playwright-python/blob/main/playwright/_impl/_assertions.py

mxschmitt avatar May 04 '22 19:05 mxschmitt