我通常使用这个新的 Select(driver.findElement(By.id("title"))).selectByVisibleText("Mr"); 这工作得很好。
我正在移动一个更多的 PageFactory 方法我定义了 WebElement
@FindBy(id="title") 私有 WebElement 标题;
如何使用此选项在下拉框中选择选项?
我尝试使用这个 driver.findElement((By) title ) 但这并没有给我 selectByVisibleText 的选项。