playwright-go
playwright-go copied to clipboard
[bug/issue] Locator option Has does not work correctly
I have 2 points about locators.
- When we create new Locator using Page we can pass PageLocatorOptions. But now if we pass Has option it does not work correctly and returns an error with message "Malformed token".
For example, this code will return the error because of wrong selector concatenation.
inputLocator, err := page.Locator("input[name='some']")
require.NoError(t, err)
listLocator, err := page.Locator("ul", playwright.PageLocatorOptions{Has: inputLocator})
require.NoError(t, err)
text, err := listLocator.InnerText()
- The Locator.Locator method does not have a LocatorLocatorOptions parameter. It would be very useful to add the ability to use this option