我需要在将文本传递到文本框中时,从google map API动态产生的建议中选择第一个下拉值。我已经尝试了以下代码,但是actions.sendKeys(Keys.ARROW_DOWN)无法正常工作。请帮助
public void enterFeilds(String Attribute0,WebElement Attribute1)
{
waitForVisible(driver,Attribute1);--fuction to wait untill element become visible
Actions actions=new Actions(driver);
actions.moveToElement(Attribute1);--passed the web element here
actions.click();
actions.sendKeys(Attribute0).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER);
actions.build().perform();
}