页面工厂模式和下拉列表
page factory pattern and dropdownlist
我是selenium的新手
我需要一些帮助才能做到这一点。
如何使用页面工厂模式 select 下拉列表
我试过的代码不起作用
我收到一条错误消息,指出需要注释名称
@FindBy(how=How.ID,using="ccompound")
public WebElement Select_Compound;
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly")
谢谢
将最后 2 个语句移至测试方法。这就是您收到语法错误的原因。
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly");
最后一条语句不能存在于方法之外。
我是selenium的新手
我需要一些帮助才能做到这一点。
如何使用页面工厂模式 select 下拉列表
我试过的代码不起作用
我收到一条错误消息,指出需要注释名称
@FindBy(how=How.ID,using="ccompound")
public WebElement Select_Compound;
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly")
谢谢
将最后 2 个语句移至测试方法。这就是您收到语法错误的原因。
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly");
最后一条语句不能存在于方法之外。