webElem$sendKeysToElement() throws "java.lang.String cannot be cast to [Ljava.lang.CharSequence" error
taiyodayo opened this issue · comments
Operating System
dockerhub: rocker/verse:latest (ubuntu20/amd64)
confirmed on tags 4.0.3, 4.0.4
Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)
dorckerhub: selenium/standalone-chrome-debug:3.141.59
Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)
Google Chrome 83.0.4103.14 dev
Other driver version (chromedriver 2.27, geckodriver v0.11.1, iedriver x64_3.0.0, PhantomJS 2.1.1 etc.)
ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416})
Expected behaviour
at some point between 2021/3/7~3/10, after a routine container update,
all code that follows this pattern started throwing exceptions:
webElem <- remDr$findElement(using="xpath", value = 'somexpath')
webElem$sendKeysToElement(list(stringvalue))
workaround is to rewrite the above code as: (pass a character object instead of a list)
# pass a character object instead of a list
webElem$sendKeysToElement(stringvalue)
Actual behaviour
Following error is displayed, halting the execution.
Selenium message:java.lang.String cannot be cast to [Ljava.lang.CharSequence;
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
Further Details: run errorDetails method
Steps to reproduce the behaviour
I'm currently investigating.
The fact the codebase was working perfectly fine until last week,
suggest something may have changed in RSelenium and or rocker/verse container.
We found the cause of this problem.
This was caused by an error in the user code, and not a RSelenium problem.