AttributeError: 'WebDriver' object has no attribute 'get_device_time'
See original GitHub issueThe problem
When I tried to use driver.get_device_time()
method, it threw this error:
AttributeError: 'WebDriver' object has no attribute 'get_device_time'
Environment
- Appium version (or git revision) that exhibits the issue: 1.16.0
- Last Appium version that did not exhibit the issue (if applicable): N/A
- Desktop OS/version used to run Appium: Windows 10
- Node.js version (unless using Appium.app|exe): v8.11.3
- Npm or Yarn package manager: npm
- Mobile platform/version under test: android 9
- Real device or emulator/simulator: real device
- Appium CLI or Appium.app|exe: Appium CLI
Details
-
I start appium service by using this command(before that I updated appium to 1.16.0 by using
npm -g update appium
):appium -p 4723
-
I set up the driver on my python script:
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
-
I am trying to get device time by using:
driver.get_device_time("YYYY-MM-DD HH")
-
I ran the python script and it threw the following error:
AttributeError: 'WebDriver' object has no attribute 'get_device_time'
However, if I use the appium desktop app(1.16.0
) instead of starting appium on cmd line, it worked fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Selenium - AttributeError: 'WebDriver' object has no attribute ...
I wrote a code in Python for Web Scraping and fetching HTML table but its throwing an Attribute Error : 'WebDriver' object has...
Read more >attributeerror: 'webdriver' object has no attribute 'driver'
Why getting error AttributeError: 'WebDriver' object has no attribute 'executes_script' ... I am trying to get device time by using:
Read more >Unable to locate an element with latest appium python client ...
After upgrading the version to the latest ones observing this issue when I trigger any script: AttributeError: 'WebDriver' object has no attribute ......
Read more >'WebDriver' object has no attribute 'find_elements_by_xpath'
i got an error while trying to run a robot framework script. Can some one help me to solve the issue. Basically xpath...
Read more >Selenium — Python — AttributeError: 'WebDriver' object has ...
Solved — Selenium — Python — AttributeError: 'WebDriver' object has no attribute 'find_element_by_name'. Get Selenium working with Chrome — Deprecated ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I upgraded
Appium-Python-Client
to 0.49, and it was working, thank you so much!@zhengyu88 Thanks for your info.
v0.28
doesn’t haveget_device_time()
, it’s available fromv0.35
. Please updateAppium-Python-Client
and try again.[Notes] Added format to device_time as argument https://github.com/appium/python-client/pull/312
Not sure why it works with below environments from current info.