What are you trying to achieve?
Codeceptjs uses package called convert-cssxpath to convert css to xpath. In old version it was using css-to-xpath to do so.
When I use any css locator eg. div[data-testid=''] i.e. with empty attribute value, convert-cssxpath throws error as Invalid CSS selector and returns a wrong xpath (empty value)
What do you get instead?
I am using a css locator div[data-testid=''] which is getting coverted to wrong xpath //*// expression.
If I use div[data-testid='dummy'] if gets converted to //div[@data-testid="dummy"] which is correct. The only problem exists with empty values.
What are you trying to achieve?
Codeceptjs uses package called
convert-cssxpathto convert css to xpath. In old version it was usingcss-to-xpathto do so.When I use any css locator eg.
div[data-testid='']i.e. with empty attribute value,convert-cssxpaththrows error asInvalid CSS selectorand returns a wrong xpath (empty value)What do you get instead?
I am using a css locator
div[data-testid='']which is getting coverted to wrong xpath//*//expression.If I use
div[data-testid='dummy']if gets converted to//div[@data-testid="dummy"]which is correct. The only problem exists with empty values.