Hi
I have a question about CSSSelector and my coding is below:
new Select(d.findElement(By.cssSelector("select[id^='Template'][id$='ctl00_wtBrokerPooledTeam_BrokerId']"))).selectByIndex(1);
//Click tick button in the row
d.findElement(By.className("fa-check")).click();
//Click add Brokers to Pooled Team
d.findElement(By.xpath("//*[contains(@id,'BrokerPooledTeamTable_AddRow')]")).click();
new Select(d.findElement(By.cssSelector("select[id^='Template'][id$='ctl02_wtBrokerPooledTeam_BrokerId']"))).selectByIndex(2);
I wonder if it is possible to make ct100, ct102 as ct+i where i is 100, 102 etc for increment.
I did try to make it as variable but syntax error lie [id$='ct'+i+'wtBrokerPooledTeam_BrokerId']
Please kindly advise