-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
what's problem? how to use winappdriver in python. calculator automation #1931
Comments
you need to downgrade appium client and selenium to version3. |
which is version number appium client? status now Another problem occurs in version 3. Are you sure that winapp driver is available on python? |
Check ticket #1784 |
you means I shouldn't use winappdriver in python not yet? |
Your call |
I checked your link. #1784 Should it be updated so that python can work on the latest versions of selenium and appium? |
Yes, but Microsoft is in deep slumber for this project as it's evident with 1k open issues |
that's too bad..I should give up on python. |
Or use a different tool with python if you really like python. For example, with respect to calculator automation https://github.com/daluu/AutoItDriverServer/blob/master/sample-code/calculator.py https://github.com/daluu/AutoPyDriverServer/blob/master/sample-code/calculator_demo.py calculator automation aside, there are other UI tools that should have python interface, or that you can use with python via IronPython for .NET based tools. but not that the samples I provided were for older Windows back in Windows 7 or earlier. The locators might have changed for Windows 10+. |
0
I don't know what the hell's wrong. Why doesn't it work?
this is error message
and when I used to "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" same problem too
====================================================================== ERROR: setUpClass (main.SimpleCalculatorTests)
Traceback (most recent call last): File "F:\자동화\WinAppDriver-master\Samples\Python\calculatortest.py", line 29, in setUpClass self.driver = webdriver.Remote( ^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\appium\webdriver\webdriver.py", line 257, in init super().init( File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in init self.start_session(capabilities) File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\appium\webdriver\webdriver.py", line 346, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute self.error_handler.check_response(response) File "C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: Bad capabilities. Specify either app or appTopLevelWindow to create a session
`
import unittest
from appium import webdriver
class SimpleCalculatorTests(unittest.TestCase):
if name == 'main':
suite = unittest.TestLoader().loadTestsFromTestCase(SimpleCalculatorTests)
unittest.TextTestRunner(verbosity=2).run(suite)
`
The text was updated successfully, but these errors were encountered: