First post, please be kind. I searched for more hours than I care to admit - desperate for an answer to a seemingly simple answer.
After a few hours, I was able to cross the bridge from Selenium to Appium, and get everything properly set up, and start automating directly to my attached Moto G4 Play. Works with the Appium desktop perfect, and despite this being my first dive into Android internals, my initial tests with Python/Appium had me "auto-tapping" through the app quite nicely.
But, I ran into a brick wall because I simply cannot scroll the screen (in my script). I figured that I needed to specify in Appium desired capabilities that I wanted to use UIAutomator2, since it has more scrolling options. But, immediately, the UIA2 engine couldn't find (by resourceID) the same element that could be found with UIA1. I don't get it. So, I decided to print every element that python script could detect on the page (with UIA2), and amongst those elements, it clearly showed the exact ResourceID that was found with UIA1. At this point, I'm lost. I can provide specifics, as requested, but hoping someone can start to point me in the right direction.
Thanks.
EDIT: Additional info and code (thanks for the feedback data_garden). Here's the line of code that fails going from UIA1 to UIA2:
HeadMaster = WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.ID, "Head__master-id")))
A TimeoutException is thrown on UIA2 (element not found):
The element is there, no doubt about that. I not only listed it via my script, but inspected it with the Appium desktop and the UIInspector.
Is it perhaps related to some deprecated symbols? Doubt it, considering underscores and dashes are pretty mainstream.
EDIT:
Also want to add this problem is occurring running Appium Server 1.7.2.
Related
I'm working on creating a CordApp which I'm expecting to run on user's phone. Android as a starting point. From my reading so far, Android phones do not have a JVM running on the phone and the compiled code is converted into either Dalvik or something similar.
Has someone tried to install their CorDapp on an android based mobile device?
I'm a nooby in the area of CordApp as well in android apps but hoping that I can find some good starting tips here. Thanks for help.
The bottom line is that Corda needs a JVM environment to execute. The most light-weight test we have tried is Raspberry Pi with 2G Memory.
(answering the follow-up in the comment above)
You might be able to run several distinct nodes on some server. However at that point there would be little point in using Corda in the first place.
Once you run a node "somewhere else" the user won't own the private key for its node, and all the safety of using Corda disappears. You're reverting to a 'trusted third party' model.
I can't seem to get Galarzaa's library to work.
Neither his example nor the code under "usage" on the front page compiles.
The following line (and every consecutive call on rc522 from the "usage" section) causes a problem:
boolean result = rc522.authenticateCard(Rc522.AUTH_A, block, key);
Does any one know a tutorial or any helpfull link?
Also, do I have to configure the GPIO Pins of my build when I create it from the Android Things console under Step 5 Edit hardware configurations? If so, where do I find all the neccessary information? Or can I completly ignore that part, as long as my RC522 reader is properly connected to the RPi
I did got it to work following the example. I don't recall anything wrong with the documentation, but I'll double check.
I think you are trying a very complicated method for deploying. You are supposed to use the console and the custom images when you are done developing and want to do distribution. While in development, you should use a default image and Deploy the apk using adb.
Certain pages in our android native app are not inspectable with Appium Desktop and Appium Studio. However with uiAutomatorViewer, I can inspect those screens and take resource-ids. But Appium is unable to locate element with these Ids/xpaths. Did check with dev team but they are not sure about what is going on. Does anyone had similar issues?
Any help or suggestions would appreciated much!!
Before finding element may be you can try getDriver().getPageSource() and by using this it will get the focus of the driver and then try finding elements. If this doesnt help try printing getdriver().getpagesource() in console and try to look whether the element is present in the pagesource or not. if it is there then you can use document builder and parse the pagesource text and get xpath element out of it and once you get the element (this will be generic XML element) get attributes like location and using that tap at that coordinates and this will defenitely work
I had the same problem just when dialogs where shown, To have it working I send the app to background for 0 secs, after a dialog was dismissed, and I was able to resume my tests
Python code
driver.background_app(secs) #you can specify 0 secs
Java code
driver.runAppInBackground(secs) //you can specify 0 secs
Let me know if it worked
Lately, while attempting to build an interesting open source android-web streamer: Android-Eye, I noticed that several people, including myself have been stumped by process of building the application given that it contains c/c++ code that (I think) needs to be compiled by the android ndk before anything can work. The fact that the dev doesn't seem to be active anymore doesn't make this any easier.
I've been trying to get this to work for well over 3 days now and can say with full confidence that I do not posses the knowledge (especially for the ndk) to get this thing built. The long list of things i've tried is too extensive to be covered in this post but here are a few git issues posted by others that have experienced similar issues as me:
https://github.com/Teaonly/android-eye/issues/32
https://github.com/Teaonly/android-eye/issues/27
I understand that it may look as if I am asking to be "spoonfed" the process of building the application but a few pushes in the right direction would be excellent :)
BTW, I have access to windows and mac boxes incase that influences the build process.
Thanks
Hy everyone, I'm Korean and a little short on using english so please try to understand if I say things not appropriate.
So, my status is that I have odroid-s.
What I'm trying to do for like month or more is that I want to make android to HelloWorld.
What I want to say is that, on the odroid-s, bootloader part, kernel part is the same but the framework part(which will be android), I'll remove all the android part and replace it with just HelloWorld program. The purpose of this HelloWorld program is to display HelloWorld on the screen.
What I think I discovered is that, as I 'vimdiff' bootlogs between normal bootlog and the one that I removed all the system partition part (which is android system partition part) is that android kernel's init goes on and executes console(/bin/sh), netd(bin/netd), ... and it enables adb and it completes his work.
So my conclusion is, I need to use Linux kernel that is non-modified and modify it for odroid-s, and use that kernel for my HelloWorld program!
What I want to ask is.... Am I doing it right?? T_T
My goal right now is to make HelloWorld come out from this odroid-s device...
Please somebody help me. If anybody don't understand what I wrote plz tell me, I'll fix it.
Thx for reading....
The modifications to the linux kernel are likely to be irrelevant to your goals, so you might as well leave them in place for simplicity.
Your biggest challenge is going to be output - where do you want to send it? If you had one of the devices that has (or can have with the right kernel config) a debug serial port, then it would be really easy to write something triggered by the init script (or even use 'echo' in the script) which outputs your message on that port.
But chances are you want to put something on the screen. This is going to be overwhelmingly more complicated, and perhaps device dependent. The way the android runtime does this for actual apps is going to be way more involved than you probably want to get into.
A more practical approach might be to look at how the boot animation is done. For starters you could just replace it with a static image that says "hello world". Once you can do that, the next step would probably be to find some character generator code. Finally you might want to implement scrolling and other terminal-like features.
As an alternative approach, there are builds of more traditional linuxes for some android devices - debian or ubuntu for example. These may include console implementations capable of displaying on the device screen.
As another idea, if you are flexible about how much of android you would be willing to leave on the device, you could build a version of the android terminal emulator example, modified to be a home screen replacement. You might be able to remove a lot of android components (eventually including the default home screen). Or on a secured device (ie, most consumer devices that haven't been rooted) you could just do the home screen replacement while leaving the actual system unmodified. It wouldn't be secure against users wanting to run other things, but generally the user would interact only with your code.