Error with selenium.WebElement.sendKeys()

前端 未结 3 1519
面向向阳花
面向向阳花 2020-12-21 09:51

I am putting together a small app to perform automated checkouts on a Magento site, using Selenium WebDriver in Java. I\'m working on learning Java, so I\'m adamant on getti

3条回答
  •  既然无缘
    2020-12-21 10:31

    I have had similar problems with calling sendKeys(). The problem usually is, that the signature is a var-ary, that is CharSequence... instead of just CharSequence.

    Of course this should not be a problem with Java 6. My guess would be that your maven compile uses a different compiler setting. Anyways you could change your code to

    searchField.sendKeys(new String[] { "sample" });
    

    to help diagnose the problem.

提交回复
热议问题