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
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- mobile-dev, testing-qa
Piste de recherche
Commencez par public/common.py à scroll_into_view et par l’appelant dans test_page/LPLoginPage_app01.py, puis suivez le chemin execute_script dans le client Python Appium et Selenium WebDriver. Reproduisez l’échec à l’aide de l’exemple de webview Android fourni et déterminez si le problème se situe dans la conversion des arguments ou dans l’exécution de la webview ; le travail est terminé lorsque l’opération de défilement signalée fonctionne avec les versions concernées et dispose d’une couverture de régression si le dépôt fournit un emplacement de test approprié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Do I have the most recent component updates?
- I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
- I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
- I have searched the existing issues
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
caps = {}
caps["platformName"] = "Android"
caps["appPackage"] = "com.picc.mcp"
caps["appActivity"] = "com.picc.mcp.IndexVideoActivity"
caps["noReset"] = True
caps["unicodeKeyboard"] = True
caps["resetKeyboard"] = True
caps["newCommandTimeout"] = 180
caps["adbExecTimeout"] = 180000
caps["logcatFormat"] = "time"
caps["logcatFilterSpecs"] = ['*:E']
caps["clearDeviceLogsOnStart"] = True
caps["chromeOptions"] = {"w3c": False}
driver = webdriver.Remote(host, caps)
driver.implicitly_wait(global_wait)
driver.switch_to.context('WEBVIEW_com.picc.mcp')
driver.implicitly_wait(global_wait)
ele = get_element(driver, 'xpath', '//a[contains(@href,"com.picc.mcp/files/mcph5/login.html")]')
str1 = 'return arguments[0].scrollIntoView();'
driver.execute_script(str1, ele)
Environment
- Operating system:win10
- Appium server version (output of
appium --version):1.22.0 - Appium driver(s) and their version(s):
- Appium plugin(s) and their version(s):
- Node.js version (output of
node --version):v14.16.0 npmversion (output ofnpm --version):6.14.11- Last component(s) version which did not exhibit the problem:appnium 1.3.0
- Platform and version under test:Internally used apps 6.1.1.0
- Real device or emulator/simulator:华为nova 4
Link 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)
- Langage dominant
- Python
- Étoiles
- 1.8k
- Forks
- 570
- Merge moyen
- 1 j 10 h
- PR mergées (30 j)
- 24
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de appium/python-client
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
appium/python-client#1230 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
question
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
appium/python-client#1168 · 9 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 55/100
appium/python-client#1147 · 7 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
appium/python-client#1091 · 4 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
appium/python-client#1076 · 2 commentaires ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de appium/python-client
Issues similaires
-
pydanty:is-working
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
pydantic/pydantic-ai#8843 ·
Les mainteneurs répondent en général sous 1 jour
-
breaking change enhancement server
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
sktime/sktime#11310 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour