Giter VIP home page Giter VIP logo

Comments (14)

xiaocong avatar xiaocong commented on August 20, 2024

Thank you. I can reproduce it and am trying to find a way to fix it.

from uiautomator.

m-sridhar avatar m-sridhar commented on August 20, 2024

Hi Xiaocong,
Any luck on this issue?
Thanks
Sridhar

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

uiautomator package uses adb shell uiautomator runtest .. to start a jsonrpc server on device, but likely it conflicts with adb shell uiautomator events. I am sorry to say that now I have no good idea to resolve it.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

This appears to work if i have "adb shell automator events" running in cmd and uiautomator jrpc server running in python. Couldn't this functionality be added as a thread that just watched for event changes? This is so far the only way I have been able to see toaster messages using uiautomator.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

Think this is possible?

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

What device were you testing on? I tried several devices on both Android 4.2/4.4, the two commands uiautomator events and uiautomator runtest could not be run at the same time.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

Samsung Galaxy S4

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

I'll play with it a little bit and try to get you an order of working events, if that helps.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

I've messed with it, I think i'm now seeing what you are talking about with both of them not being able to run at the same time. Is there a way that I can manually disconnect uiautomator in a python script so i can run events then reconnect after i obtain the information from events that i need?

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

Please try d.server.stop()

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

I got it to work after stopping uiautomator. This will be awkward to use, but I think I can figure out a way to use them together with timed stops and what not.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

To start it back up can I do, d.server.start() or d = uiautomator.Device() or....?

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

Any invoke of device method like d.info, 'd.press.home()', d(...).click() will start the server automatically.

from uiautomator.

ZeroInputCtrl avatar ZeroInputCtrl commented on August 20, 2024

k thanks!

from uiautomator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.