Skip to content

AttributeError: 'WebDriver' object has no attribute 'get_device_time' #483

@zhengyu88

Description

@zhengyu88

The 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

  1. 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
    
  2. I set up the driver on my python script:

    driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
    
  3. I am trying to get device time by using:

     driver.get_device_time("YYYY-MM-DD HH")
    
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions