0
我通常使用这个 new Select(driver.findElement(By.id(“title”)))。selectByVisibleText(“Mr”); ,这工作非常好。使用WebElement(硒)选择下拉框?
我移动更PageFactory方法 我定义WebElement
@FindBy(ID = “标题”) 私人WebElement标题;
如何使用此选项在下拉框中选择?
我尝试使用这个 driver.findElement((By)title) 但是这并没有给我selectByVisibleText的选项。
感谢这工作就像一个魅力。 – user1564179