cherry
cherry

Reputation: 21

Is there a way to use I.Click to click a declared number?

Is there a way to use I.Click to click a declared number? It can't use I.Click("#searchBox", x, y); to click the button. It just can use like this I.Click("#ui table tbody tr(week) td(dayofweek) a"); The 'week' and 'dayofweek' is declared by myself. But it's a fixed name inside I.Click and that make it can't work. Or how can I alter it and that it work?

I want to click the day inside datepicker. And I only find this way to click it.

Upvotes: 0

Views: 63

Answers (1)

kiro
kiro

Reputation: 111

something like (I assumed you want to click the link in tr that contains a tag that contains week number and that contains week number and is inside the td)

int week=1;
int dayofweek=4;
I.Click("#ui table tbody tr:has(a:contains("+week+")) td a:contains("+week+") ")

but the limitation is that "contains" fetches tag contains the string,so "a:contains(1)" can't distinguish 1 or 12.

Upvotes: 0

Related Questions