Unable to automate Hybrid Android mobile app using appium - appium-android

I want to automate test a basic Hybrid Mobile Application running in Android.I am able to launch the app in emulator but not able to enter the text in the login screen.
Getting error as
"Exception in thread "main"
io.appium.java_client.NoSuchContextException: An unknown server-side
error occurred while processing the command. Original error: No
Chromedriver found that can automate Chrome '53.0.2785'. See
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
for more details. "
Please help me resolving this!!!!!

If you see chromedriver.exe change log you will get the version you require for hybrid app automation. The browser used in your device have versin 53+
See this url http://chromedriver.chromium.org/downloads [check ChromeDriver 2.24 details] it says it supports browser with version 53+. Get this exe from https://chromedriver.storage.googleapis.com/index.html?path=2.24/
How to connect with Appium -
If you are using appium desktop, it gets installed as windows application in program files folder. Now location of chromedriver.exe it uses is as mentioned below.
C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe [This location may be bit different in your case]
Replace above location chromedriver from downloaded chromedriver.exe(from step2)
Note - Ideally automation should work without throwing exception. Incase still it doesn't work then try 1+ or 1- version of 2.24

You got everything you need in exception message:
Go here https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
and read explanation on compatibility.
No Chromedriver found that can automate Chrome '53.0.2785'
Appium was not able to get chromedriver for your emulator that have Chrome 53.0.2785
So the first solution is to get Chromedriver v2.26 and add absolute path to binary as chromedriverExecutable capability:
1) download chromedriver_win32.zip from the link above and unzip
2) in your code add capability with the path to chromedriver.exe:
DesiredCapabilities caps = new DesiredCapabilities();
...
caps.setCapability("chromedriverExecutable", "/abs/path/to/chromedriver.exe")
If you get new emulator, first check what browser version is preinstalled and try to upgrade.

Related

Where can I find full prerequisites list for releasing flutter windows desktop app?

I'm absolute newb to flutter, with objective to focus more on windows-desktop apps. It seems that flutter running on windows-desktop require way more DLLs than mentioned on https://docs.flutter.dev/development/platform-integration/windows/building page. I have created and build absolute minimum Flutter application on my dev machine (Win10 22H2). All went fine, starts and runs as expected.
I have then put mentioned DLL in the folder, along the runner app (testapp.exe) and copied over to test machine running Windows Server 2019 Version 1809 as VMWare image. Both Debug and Release versions of Flutter app (testapp.exe) fails. Debug version fails with MessageBox shown "Code execution cannot proceed because MSVCP140D.dll was not found" which I assume is a debug version of msvcp140.dll (this was present in the testapp.exe location while running).
Trying to run Release version produce no error message at all, application is visible in TaskManager for brief second and exits. Running ProcMon against test application shows it seeks numerous other DLLs which were not mentioned in the flutter docs (see attached pic for reference)
Question - is there some more comprehensive list of Flutter windows-build requirements ?

Java.utils.cuncurrent.ExecutionException: java.lang.RuntimeException:no server to serve request. Check log for details

How to fix this error. I am using android studio on my phone using Linux deploy and Ubuntu. Installed open jdk not oracle jdk. This error comes when building apk. Before that gradle build is successful. Log is too big i don't know where to start
Java.utils.cuncurrent.ExecutionException: java.lang.RuntimeException:no server to serve request. Check log for detail
Edit: This error shown in gradle console
AAPT err(faced for 340422075): /root/android/sdk/build-tools/27.0.3/aapt2 :I : /root/android/sdk/build-tools/27.0.3/aapt2 :syntax error: "(" unexpected
First of all, OMG congrats on running android studio on your phone, first time I have ever heard of anyone getting this far! :)
This error from AAPT2 comes when you try to run it on 32 bit Linux - it is not a supported platform.
List of supported platforms: here
This error is due to using build tools which does not support on arm platforms. Currently there is no build tools available for arm officially from google. This doesn't provide solution but i need to port build tools for arm.

"Installation or uninstallation is not working temporarily" error when trying to launch Tizen watch application from Tizen SDK

When trying to launch the native watch application from Tizen IDE, I see the strange message "Certain application categories, such as "Watch Application", cannot be launched by "Run As".
Indeed, I try to use Run As from the project local menu to launch my app. But how else I am supposed to launch my application on the emulator?
The emulator device (watch) is up and running, visible on desktop as a separate widget. It is selected. The signing configuration is set up.
On the console output I see the message processing result : FATAL_ERROR [61].
I also tried to launch through the created launch configuration but this results the same error message.
The IDE logs show the following stack trace:
[2015.09.06 12:16:48][ERROR] ConnectionExplorer.java(658) - Fail to get platform log
[2015.09.06 12:18:59][ERROR] RdsDeployer.java(269) - Cannot partially upload or reinstall
org.eclipse.core.runtime.CoreException: [RDS] Cannot install application
at org.tizen.common.rds.RdsDeployer.newCoreException(RdsDeployer.java:699)
at org.tizen.common.rds.RdsDeployer.postInstall(RdsDeployer.java:634)
at org.tizen.common.rds.RdsDeployer.partialZipInstall(RdsDeployer.java:566)
at org.tizen.common.rds.RdsDeployer.deploy(RdsDeployer.java:267)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.deployApplication(TizenLaunchDelegate2.java:783)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launchApplicationForRun(TizenLaunchDelegate2.java:504)
at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launch(TizenLaunchDelegate2.java:216)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.tizen.common.sdb.command.message.CommandErrorException:
Error code: FATAL_ERROR
Error message:
Command: /usr/bin/pkgcmd -q -r -t tpk -n com.au.heywatch
Management: Installation or uninstallation is not working temporarily.
P.S. I add "eclipse" tag because Tizen SDK is very clearly Eclipse based IDE. Using Tizen IDE 2.3.1.
Watch face applications(Web/native) are never installed as widgets. You cannot see them in app menu.
Reason:
Within your tizen-manifest.xml file in your project, you'll find below line there
<watch-application appid="org.tizen.watchsample" exec="watchsample" ambient-support="true">
which makes your app as watch application and these apps are known as watch faces because they will be used in setting as the main watch in gear.
And on emulator, you cannot change the watch face on the home screen. Hence, you won't be able to test your watch application that way.
Had the same issue. My problem was certificate setup.
i followed there instructions: http://127.0.0.1:50224/help/topic/org.tizen.addon.certificate/html/dev_env/setting_author_certificate.htm
(link is from help and should work in browser when Tizen IDE is up, alternately you can go to Tizen IDE -> Help -> Help Content and search Certificate.
More specific: Distributor certificate i had was wrong (use the pass received by Samsung by email)
After fixing certificate, don't forget to right click your device in Connection Explorer and click Permit to install applications.

AVD Failed to Load ~ Failed to Parse Properties ~ Mac OSX

I'm going to say upfront, please forgive me. I'm a newbie to android development and fairly new to programming. Also on a Mac. You're going to have to talk...real...slow.
I can't get an AVD to load. I've tried it from Eclipse (Juno) and from the Android SDK Manager (20.0.3). Failed multiple times.
Received the same error each time,
"Failed to parse properties from User/myname/.android/avd/nameIGaveEmulator/config.ini."
EDIT: I tried to solve the path problem on my own by checking folders and moving them around to be in the same folder, then resetting the path in Eclipse preferences, but that didn't work, so I trashed everything except for the zip files, uncompressed and started the entire installation all over again. When I opened up SDK Manager and attempted to download tools and platforms, however, I received the following. I'd forgotten that I received it on the first install. Would this have something to do with the problem?
Preparing to install archives
Downloading Android SDK Platform-tools, revision 14
Installing Android SDK Platform-tools, revision 14
Stopping ADB server failed (code -1).
Installed Android SDK Platform-tools, revision 14
Stopping ADB server succeeded.
Starting ADB server failed (code 255).
Done. 1 package installed.
Sidenotes:
When I open Eclipse and SDK Manager, I don't see anyplace to check that I'm the administrator.
If a path needs to be "changed" what exactly does that mean and how do I go about doing so? Is it simply a matter of moving folders and files into the "correct" locations and then trying to load an AVD again?
Using command line, navigate to the /tools folder in your android SDK, then use the command:
$ ./android avd
This will launch the AVD manager.

Running directx SDK samples on a Windows Mobile 6.1 device

I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on a Samsung Omnia and on the emulator and it doesn't work because of a deployment error.
I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh.
The device is correctly plugged in and set up for active sync (I know this because other samples work, also a creating Win32 smart device application and running it works).
When I try to run a directx sample application it compiles without errors but the message:
" There were deployment errors, Continue? Yes/No" appears
If I manually copy the application from the debug folder to the device and run it from there, it works.
The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully.
Is there any way to make the deployment work? Maybe there is an obscure option I need to set...
What I do is:
Connect the Mobile device to the PC,
Open Visual Studio 2008,
Open a directx sample project,
Click Run (in Debug or Release mode).
The problem with the deployment is that the file msvcr80.dll could not be found.
It was specified at the deployment options as an additional file "Project->Properties->Configuration Properties->Deployment" then "General->Additional files"
with the paths msvcr80.dll|$(BINDIR)\$(INSTRUCTIONSET)\|%CSIDL_WINDOWS%|0;
Removing it makes the deployment successful. I have only tested this on a Windows Mobile 6.1 device and with the D3DM reference driver on an WM6.1/WM6 emulator.
What I haven't figured out is where does $(BINDIR)\$(INSTRUCTIONSET) point to.
Also I don't know why msvcr80.dll is in the addition files if it is not actually needed.
Is there actually a msvcr80.dll compiled for Windows Mobile platform on an ARM cpu?
I was able to resolve this issue after doing some low-level Sysinternals Debugging. It was trying to deploy NETCFv35.Messages.EN.cab to the device and in my case it was deleted for some reason. Re-installing .NET CF fixed the issue for me. Wish VS 2008 said what file was missing instead of a generic message. Hope this helps you too.