1

I'm trying to import script created in Selenium IDE to Webdriver(Java), but for every "typeKeys" command it gives [ERROR: Unsupported command [typeKeys]], so my question is there some alternative for that command? (sendKeys is not an option for me)

Illya
  • 13
  • 1
  • 4

1 Answers1

2

The error means that Selenium IDE does not support automatically converting the command into Java. You can still use the sendKeys function and it should work as intended.

prestomanifesto
  • 12,528
  • 5
  • 34
  • 50
  • sendKeys is not an option for me, because form doesn't recognize it, and "send" button still unavailable, that's why I was forced to use "typeKeys". – Illya Dec 12 '11 at 16:04
  • 1
    you can try manually setting the attribute with javascript. Take a look at this question: http://stackoverflow.com/questions/8473024/selenium-can-i-set-any-of-the-attribute-value-of-a-webelement-in-selenium – prestomanifesto Dec 12 '11 at 16:05
  • I have 3 buttons with no id and with same class =(, in selenium I'm using x-path to find button with text "Login" driver.findElement(By.xpath("//a[@class='x-button '][contains(text(), \"Login\")]")).click(); Can i find it with javascript, so i can set its attr? – Illya Dec 12 '11 at 16:50
  • yup, if you have a reference to the element you can use it to set the attributes with javascript. Here is an example in C# (scroll down to SetAttribute): http://www.vcskicks.com/selenium-extensions.php – prestomanifesto Dec 12 '11 at 16:54