-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: <title>After upgrading Appium-Python-Client 2.11.1, webview execution scrollIntoView reported an error, 'selenium. common. exceptions. JavascriptException: Message: JavaScript error: arguments [0]. scrollIntoView is not a function #924
Comments
https://stackoverflow.com/questions/55492695/javascript-error-arguments0-scrollintoview-is-not-a-function-using-selenium-o ? Could you share the full appium server log as well? |
|
If this is not a bug, why does scrollIntoView not report this error when running in selenium, but when executing in appium. |
Possibly chromedriver knows the reason. loglevel debug may show more info. Basically the response came from chromedriver because your log had set context as below. Then, basically Appium proxies request to the chromedriver without any changes in this case.
|
here is debug loglevel log:
|
Please add |
This is the log after opening appium: showChromedriverLog
|
Hm, as the below error, the error itself came from chromedriver v81, not Appium own implementation.
Have you run chrome v81 for selenium as well? Newer Chrome such as v118 as recent versions are quit new, so such newer one may have fixes. |
|
The following is the log of selenium running with Chrome v81, and there were no errors reported in the scoreIntoView. In addition, before upgrading the Python package, Chrome v81 was also used, but there would be no error at that time. If ScollIntoView reported an error on Chrome v81, it would have reported an error before the upgrade: |
The attached log had a 500 error as below line that might be the reported error. Perhaps a different log you wanted to share?
My best guess is protocol differences. Btw, selenium v4 based appium python client (v2+) basically may have an issue for non-w3c webdriver protocol. I'd recommend using Python client v1 if you'd like to keep using |
I comment out 'w3c': false, it also report this error; |
Hm, then I don't have a good idea.
|
Yes, basically Appium has been talking w3c webdriver protocol, so you could use a newer python client and older appium if necessary, while potentially you may need to manage the appium server instance by yourselves. (we no longer maintain older versions, though) |
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
Current Behavior
After upgrading selenium 4, webview execution scrollIntoView reported an error, 'selenium. common. exceptions. JavascriptException: Message: JavaScript error: arguments [0]. scrollIntoView is not a function
Expected Behavior
Realize sliding
Minimal Reproducible Example
Environment
appium --version
):1.22.0node --version
):v14.16.0npm
version (output ofnpm --version
):6.14.11Link to Appium Logs
No response
Further Information
Traceback (most recent call last):
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\public\MyTestCase.py", line 27, in testPartExecutor
yield
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\public\MyTestCase.py", line 196, in run
self.setUp()
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\test_case\LP_CDYT_case_NEW\LP_CDYT_case_NEW_S_04.py", line 79, in setUp
LPLoginPage(self.logging).login_collection(self.driver, self.data['app_user'], self.data['app_pwd'],
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\test_page\LPLoginPage_app01.py", line 174, in login_collection
self.click_back_login(driver,type1=type1)
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\test_page\LPLoginPage_app01.py", line 157, in click_back_login
scroll_into_view(driver,ele)
File "D:\YR\UITestAND_PICC_LP_APP01\UITestAND_PICC_LP_APP15\public\common.py", line 650, in scroll_into_view
driver.execute_script(str1, e)
File "C:\yurui\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 405, in execute_script
return self.execute(command, {"script": script, "args": converted_args})["value"]
File "C:\yurui\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
self.error_handler.check_response(response)
File "C:\yurui\Python\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 122, in check_response
raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
selenium.common.exceptions.JavascriptException: Message: javascript error: arguments[0].scrollIntoView is not a function
(Session info: chrome=78.0.3904.108)
(Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Windows NT 10.0.19045 x86_64)
Stacktrace:
JavaScriptError: javascript error: arguments[0].scrollIntoView is not a function
(Session info: chrome=78.0.3904.108)
(Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Windows NT 10.0.19045 x86_64)
at errorFromMJSONWPStatusCode (C:\Users\admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:764:12)
at ProxyRequestError.getActualError (C:\Users\admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:661:14)
at JWProxy.command (C:\Users\admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at AndroidUiautomator2Driver.execute (C:\Users\admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\commands\execute.js:19:10)
The text was updated successfully, but these errors were encountered: