playwright-go
playwright-go copied to clipboard
[Feature request] Web first assettions
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
}
}
(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