Galen javascript API. CSS selector for first child

161 Views Asked by At

I am trying to write functional tests using Galen javascript API. I have to select first li of a ul.

this.menu = $page("Menu Bar", {
    menuItem: "ul.section li:first-child div"
});

It seems css selector first-child is wrong here.

I can do the same using xpath: xpath: //ul[@class='section']//li[1]//div

But I want to do using CSS selector. Please help

1

There are 1 best solutions below

0
On

Raised issue in github. It seems to be a galen problem.

https://github.com/galenframework/galen/issues/423

Will be fixed in the version 2.3