Error with selenium.WebElement.sendKeys()

前端 未结 3 1520
面向向阳花
面向向阳花 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:38

    I discovered another way to work around this. I was not specifying the version of Java to compile for, so Maven was compiling for an older version. I added this to my pom.xml:

      
        org.apache.maven.plugins
        maven-compiler-plugin
        2.0.2
        
          1.5
          1.5
        
      
    

    That allows me to just a literal string "SAMPLE" in sendKeys() and it works fine.

提交回复
热议问题