元素定位之下拉框Select

1、按照class定位

Select  select = new Select(driver.findElement(By.className("u17")));

select.selectByVisibleText("北京市")

2、按照value值定位

select.sekectByValue("tianjing");

3、按照index定位

select.selectByIndex(3);