欢迎光临娇娇家的美衣阁 http://shop105984718.taobao.com/
标准的下拉列表为select类型
封装方法
public void select(String xpath, String value){
Select s = new Select(driver.findElement(By.xpath(xpath)));
s.selectByValue(value);
}
操作页面如下所示
select("//select[@id='parkind_add_shopGoodsParkinds_cParkindtype']","0"); //普通参数
select("//select[@id='parkind_add_shopGoodsParkinds_cParkindtype']","1"); //筛选参数
参考:
http://jarvi.iteye.com/blog/1450883
欢迎光临娇娇家的美衣阁 http://shop105984718.taobao.com/