1

send keys are not working in selenium with python. This was working earlier but it fails now. I don't know what may be the issue . It gives following error :

u"Element is disabled and so may not be used
for actions\nCommand duration or timeout: 11             
milliseconds\nBuild info: version: '2.15.0', revision: '15105', time:
'2011-12-08   09:56:25'\nSystem info: os.name: 'Windows 7', os.arch:
'amd64', os.version: '6.1',    java.version: '1.6.0_22'

I have used below along with time.sleep(3) before passing keys

elem.send_keys('selenium')   
elem.send_keys(Keys.RETURN)    

Also

elem.send_keys("Sale" + Keys.RETURN)   

But nothing works

1
  • Fix formatting and grammar, why is everything a block quote? Commented Apr 4, 2012 at 8:43

2 Answers 2

1

As the error says, the element is disabled and hence you(a user using a browser, selenium tries to mimic such a user) can not interact with that element.

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

Comments

1

I noticed this also. find_element_by_* returns a list. A quick fix is to use the first element, i.e. elem[0].send_keys(text).

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.