Recently I've started using Robot with Selenium2Library to automate some GUI test cases. One of the application I'm automating is ReviewBoard.
So far I've been able to automate some stuff but having a lot of problem with inputting text into text area. An example would be the description field on reviewboard.
My latest attempt is
:FOR ${URL} in @{URL_LIST}
\ Go To ${URL}
# Enter team reviewer name and press ok
\ Click Element xpath=//*[@id="fieldset_reviewers_body"]/tr[2]/td/a/div[@class="rb-icon rb-icon-edit"]
\ Input Text xpath=//*[@id="fieldset_reviewers_body"]/tr[2]/td/form/input rbtest_teamreviewer1
\ Press Key xpath=//*[@id="fieldset_reviewers_body"]/tr[2]/td/form/input \\9
\ Click Element xpath=//*[@id="fieldset_reviewers_body"]/tr[2]/td/form/span/input[@class="save"]
# Fill out Testing Done field
\ Click Element xpath=//*[@id="review_request_main"]/div[2]/label/a/div[@class="rb-icon rb-icon-edit"]
\ Press Key xpath=//*[@id='review_request_main']/div[2]/div/form/*//textarea Testing Done
\ Click Element xpath=//*[@id="review_request_main"]/div[2]/div/form/div[2]/input[@class="save"]
However, I'm receving the exception
ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with
Stacktrace:
at fxdriver.preconditions.visible (file:///tmp/tmpW24ACY/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:10092)
at DelayedCommand.prototype.checkPreconditions_ (file:///tmp/tmpW24ACY/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12644)
at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpW24ACY/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12661)
at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpW24ACY/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12666)
at DelayedCommand.prototype.execute/< (file:///tmp/tmpW24ACY/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12608)
I've try different ways such as using Input Text instead of Press Key but having similar problem...I don't have any problem when type is input.
Does anyone have any idea how I might be able to solve this?
If you are interested, you can view the demo reviewboard at http://demo.reviewboard.org/r/1502/ with username:guest6317 password:demo
rb-icon-editthe page generates a new CodeMirror editor instance. The correct way to change its value is described here: stackoverflow.com/questions/8378678. But you need to know the name of CodeMirror object. I suggest you ask this from the developers. When you know the object name, run javascript with RobotFramework'sExecute Javascriptinstead ofPress Key- jim