I need to write selenium test scripts for an android app and test them using appium. I have so far written selenium test scripts for web applications where we perform "Inspect Element" to locate web elements and include them in our test scripts. But I have no idea how to locate the elements on the android app to write test scripts for it. Can anyone please tell me how to locate elements and write a selenium script for an android app???
Assuming you have Android SDK installed in you machine, please open uiautomatorviewer.bat file from /adt-bundle-windows-x86-20140702/sdk/tools and make sure that android app is running on the real device or mobile emulator. In order to start scripting for Mobile automation, you many want to refer the following link:Appium and Appium guide
Related
I am good with Selenium and worked on many projects of automation but first time I need to automate Web app specifically on firefox with Android. I have used appium successfully for Chrome but could not find a way to launch a firefox gecko driver just like desktop web app in selenium.It is very simple in selenium btw. This is very strange for me that appium does not support firefox capability. Can any one help me on how to run my automated test cases on firefox with Android platform. Thanks in Advance.
First, to use appium android we should first know the package name and the package activity of the application to be tested.
Install manual first via play store your apps or install via your APK.
Please visit this site to understand more:
http://www.automationtestinghub.com/apppackage-and-appactivity-name/
Now, for the issue in this thread I can get information that firefox on android has a package name org.mozilla.firefox and package activity .App.
Just put them in capabilities like this:
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("appPackage", "org.mozilla.firefox");
dc.setCapability("appActivity", ".App");
Note : The above, assumptions using the java language
http://appium.io/docs/en/writing-running-appium/caps/
When you call driver.launchApp();, it has launched the firefox you have installed.
If you want to install directly via code, add the following capabilities:
dc.setCapability("app", "theAbsoluteLocalPath/firefox.apk");
Appium does support Geckdriver to automate tests on firefox on a mobile device
To run selenium tests on below the below have to be configured
1.Firefox Browser,
2.Android SDK (incase you want it to on a virtual device)
3.Geckodriver
Follow the documentation from the appium website : http://appium.io/docs/en/drivers/gecko/
I have working Python script using Selenium (Windows), and I want run same script (with driver replacement) on android device. I found some info about Selendroid and Appium, but they seem to be used for connecting to Android devices, not to port code.
I'd be glad for help with this issue or some useful links to read about it.
Kivy Is the way do the thing which you want.
Kivy is the library which provides the platform to execute python, also kivy is open source so anyone can use that.
Github Link
Kivy Showcase link
As I can see here you need OS X to build apps with React Native. That is probably because they used it at first to create only iOS apps. Now it's possible to create Android apps with React Native but they still require OS X as development platform which doesn't make sense to me. Is there any way to create Android apps using React Native on Ubuntu OS or any other Linux?
Update 2: I've been developing React native apps on Ubuntu for some time now, without any issues.
Update 1: It's almost possible on linux and windows now. Check this doc page: link
Old answer:
It's already almost working, from the issue shared in kzzzf's answer:
Everything works on Linux except:
react-native run-android can't open a new shell window, you need to
use react-native start. Will be fixed in next release. Debugging in
Chrome currently relies on an AppleScript to launch Chrome. There's a
PR to replace that.
Building on linux and windows is not officially supported although there are people in the community already sending pull requests that will allow to do so (main obstacle is the fact of using apple-script and calling to shell scripts from node - from react-packager and from react-cli).
Main task for tracking those efforts is here: https://github.com/facebook/react-native/issues/2693
While it's not officially supported on Linux yet, and there are certainly some hoops to jump through, I have created a docker container that allows me to build and run android apps from Ubuntu.
The dockerfile is still a work in progress but it's available on github: https://github.com/gilesp/docker/tree/master/react_native
There's a couple of shell scripts to make local development easier - I mainly use the react-bash script to give me a shell prompt in the container for running react-native run-android etc.
It works well enough that I can have a phone connected via USB on my host machine, the react native stuff running in the container and have my edits to the code (I mainly edit using emacs on the host) appear immediately on the device.
I'm currently working on CI builds for android as there are some more hoops to jump through to create the bundled version of the javascript for deployment.
It should be possible by now. For an up to date guide on "can i build for platform X on system Y", see:
https://facebook.github.io/react-native/docs/getting-started.html
I want to do Ruby development on an Android tablet, just like on any laptop. So, using vim, git, and rspec to run tests. So, I've found the following apps:
Vimtouch
Ruboto
Git (yes, it's an app)
Terminal Emulator (provides bash)
Each app works just fine. By itself. But, I don't know how to put it all together. I'm a bit of a newbie when it comes to how Android works. So, if anyone could help provide a writeup so that I can:
clone a github repository
edit files from that repository
run my tests
NOTE: I don't want to write an Android app. I want to use my tablet to do Ruby development.
The Android Scripting Environment said to plan on Ruby. Might be worth a check how far they got; at least they're tagged "JRuby" at Google Code. According to their project page:
Scripts can be run interactively in a terminal, in the background, or via Locale. Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell are currently supported, and we're planning to add more.
this can be done
Compile Ruby and Nodejs for android
Install on device and configure with c/c++ ide (You can use
C4droid,CCTools,Terminal IDE.... for installing the expansion
modules on с/с++)
In order to develop an Android app using Python, I need to install Python for Android and SL4A on my computer to be used with the Android emulator. My question is, when I distribute this app to actual users/phones, do the phones need to get Python for Android and SL4A explicitly? Or is the supporting infrastructure built into Android devices? Or is there a way to package the Python application where the users do not have to get SL4A and Python for Android in order to run the application?
Instructions on redistributing your script to run on devices other than your development one are here:
http://code.google.com/p/android-scripting/wiki/SharingScripts
You can wrap them in a template project and build a stand alone apk.
Your users have to install SL4A and the language plugin (python?) on their phones, this is not a built-in functionality.
Since the source code is available, it's possible to create combined application, which includes your scripts and SL4A/python code, but in my opinion this defies the purpose of scripting in the first place.