应该是
public String countTable(){
List<WebElement> located_elements = driver.findElements(By.xpath("//*[@class='z-listbox-body']/table/tbody[2]/tr"));
int count = 0;
for(WebElement located_element:located_elements){
count ++;
}
String s = String.valueOf(count);
return s;
}
如果你能提供帮助,我将非常感激。
答案 0 :(得分:2)
您需要APPLY
(即CROSS APPLY
)才能将列转换为行。
select
qtynames as Month,
max(case when dt = '01' then qty end) [01],
max(case when dt = '02' then qty end) [02],
max(case when dt = '03' then qty end) [03],...
from table t cross apply (
values ('month', dt, 'planqty', planqty), ('month', dt, 'actqty', actqty)
)a(mnames, dates, qtynames, qty)
group by qtynames