1

I created my selenium IDE test, I exported the test to Python 2 Remote control. When I run the script it gives me this error:

[root@localhost python]# ./check_selenium.py -s pruebas -w 40 -c 60
SELENIUM UNKNOWN FAIL: not all tests passed -> pruebas  | E
======================================================================
ERROR: test (__main__.test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pruebas", line 21, in
    sel.send_keys("id=buscador", "3")
AttributeError: 'selenium' object has no attribute 'send_keys'

----------------------------------------------------------------------
Ran 1 test in 59.428s

Can not use keys with Remote control?

this is my line:

 sel.send_keys("id=buscador", "3")

Regards

2
  • where is the code? Commented Dec 26, 2018 at 12:27
  • 3
    Do you have a minimal, complete, and verifiable example? I have no idea how you defined the sel variable. Commented Dec 26, 2018 at 12:31

1 Answer 1

2

According to the Selenium docs, send_keys does not prive that kind of call. I think, you need to find the element object with find_element_by_id, first. Then call send_keys of that object.

sel.find_element_by_id("buscadorReferencia_widget").send_keys("8090393")

(This assumes, that sel is your web driver object.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.