Readable code to deal with "buttons" based on css, divs and spansNovember 12, 2020 at 7:07pm
Original question is at https://github.com/getgauge/taiko/issues/1676
Using "click($(".options-button"))", Taiko is able to click into the gear icon but I'm looking for a more readable way to implement it, not depending on css/xpath selectors
As suggested, I used "click(listItem(toRightOf("Web Canvas")))" and unfortunately is not working for this case
I'd appreciate any suggestions at this point. Thanks!
November 13, 2020 at 7:59am
Are you also in control of the frontend code? If you are, adding a test-element name could be an easy way to get a unique selector for the button. e.g.
Does click(button(toRightOf(textBox("Web Canvas")))); work? My go-to in these solutions is to just try all kinds of different proximity selectors, but it's hard without the actual page available. Hope you find a working solution!
(skarra) again, thanks for your help! The above coded is not able to detect the icon neither; I tried replacing button() by link(), listItem(), checkBox()... with no success
I'll try the remaining ones but if you think uploading the HTML code of the page would help, I can do it :)
November 15, 2020 at 9:44pm
November 16, 2020 at 1:59pm