I need to automate some actions (testing ajax login on demand) in a browser.
I manage to obtain the desired behavior using selenium and chromedriver on my pc, but I need to make it work either in a UWP app or in an Android app (*and must run without a pc once deployed)...
Notes:
UWP App
It's a web service that runs on Windows 10 IOT Core on a Raspberry 3b+ (ARM7)
Selenium seems to be incompatible to UWP apps... Maybe because of they are sandboxed and can't start new processes?
The app won't be published on windows store
I can add all needed capabilities
Android
It's an app that remotly commands the UWP app
Selenium integration compiled but execution blocks on "webDriver.get(url)"; I did'nt find a way to make it work yet.
I'm flexible concerning software/os/browser/libraries/etc to use.
The UWP & Android Apps are kinda complexe (they have many file...)
I don't know how to install a browser on the IOT Core (did'nt find an msix or appxbundle I could use)
Some ideas I had:
- Deploying the ARM7 chromedriver with a portable ARM7 chromium with the app
- Using dockers
- Using raspbian & mono
The ideal solution would be simple and working on android (if possible)...
Any of you have an idea of how I could do that?
I finally found a solution. I reproduced the desired behavior in Android using a WebView and javascript using the evaluateJavascript method.
It's a little tricky but perfect for my need.
I want to create client/server offline application. Server should be hosted on a mobile device. Other devices throught a browser should get some content from serrver. Is it possible at all? Is it possible using phonegap? Could anyone give me advice about it?
I use this chrome plugin in a couple of enterprise apps:
https://www.npmjs.com/package/cordova-plugin-chrome-apps-socket
It works on Android and iOS, is very stable, and you can use it as socket server/client and also as webserver.
Update:
First: If you are developing Cordova-Apps, then make a decision what you want to use (Cordova, Phonegap, Ionic, …). Don't mix things and read the documentations.
Second: If you want to install a Cordova plugin from npm, the syntax is:
cordova plugin add [npm-name]
For installing the chrome-sockets-plugin, use:
cordova plugin add cordova-plugin-chrome-apps-socket
Before you start writing a server-client-socket app with this plugin, read the full documentation from Google. It is not a task which works out of the box and needs some lines of code and some experience in Javascript.
As an alternative to having to create an “external” in c/c++/objc to a new Livecode application, I have developed instead a Python network socket app that communicates with it via sockets. The reason for this is that I needed to use some functions provided by some of my “custom” Python libraries. These functions are not doable in Livecode natively at this time. The communication between the Livecode and the Python apps works just as I desire.
I have only tested this technique in a desktop app on OSX for now. When saving the standalone, I’ve bundled my compiled Python app in the “Standalone LC Application Settings” and the whole thing installs and works without problems.
Now, can the same task possibly be accomplished for IOS and/or Android apps?
Can I bundle a compiled Python script with a Livecode IOS/Android mobile app in order to run in these devices? I’m aware of course, that Python is not installed by default in either IOS or Android. What is the best way to accomplish this then? I’m pretty new to Livecode. I’ve tested my Python script on Pythonista on both an iPhone and an iPad just to make sure it will run and it works flawlessly there. So, how do I package my Livecode app with my python script so they could be both installed and ran in the mobile devices?
How do you call your Python scripts? The Shell command is not available on mobile so I guess you would need to create an external that would call your compiled script. But then sockets isn't available either on mobile yet (will soon be afaik). But out of curiosity what is your python script doing that can't be done in LiveCode?
I have developed an android webapp with Phonegap (Cordova 2.7.0). The app needs to receive some prices pushed by a server through the use of a third party JS API (Diffusion).
The app works well on standard desktop browsers, where websockets are available, however on the Android emulator does not seem to work due to this latter's lack of support for websockets.
I thus thought to use a different mobile browser, such as Opera or Chrome, however I now have the problem of ensuring Android uses this new browser, when executing my webapp, rather then the standard one.
Does anyone know how to do this?
Thanks.
PhoneGap for Android uses WebView, not a browser.
The simplest solution is to use a Web sockets plugin for PhoneGap, or to write your own such plugin if you cannot find an existing one that you like.
It is theoretically possible to rewrite PhoneGap to use the Android version of Chromium, but this will be a massive undertaking.
I have to regularly test the availability and functioning of a movie rental website. I wrote a Windows program which is able to automate a web browser according to a script, so this task is basically solved. Now I have to automate the mobile version of this web application: a native iOS app and a native Android app.
These apps are closed source, so cannot be modified in any way. I think the test app should be deployed on the test devices (iPhone, iPad, Galaxy Tab, Galaxy S II), but I must be able to remote control it. I mean, I would like create a connection between the test devices and a PC, upload test scripts from the PC to the devices, run them, and download the test results to the PC. The test script should start the app to be tested, manipulate its GUI (fill editboxes, push buttons etc.), and follow its response somehow, for example by analyzing the GUI (the existence of some GUI elements, their caption, etc.), analyzing screenshots, and/or inspecting IP packets.
I wrote lots of similar test programs for Windows: I used ShellExecute, PostMessage, FindWindow, the WinPcap library etc., so I know how such a program should work. But since I never wrote applications for mobile OS's, I don't even know whether there are similar APIs and libraries for iOS and Android.
I would like to know where to start, I mean, which SDKs and developer tools could be used to write such an application. I'm also interested in commercial solutions. I would really appreciate any help.
I like "Calabash-iOS/Calabash-Android" by LessPainful. That is the best for me.
free
available on iPhone and Android
record and playback
test on native and simulator
They doesn't have a GUI IDE. They are Ruby-based solutions and it is very easy to write test case script, like this:
Then I swipe left
And I wait until I don't see "Please swipe left"
And take picture
Also it can be
Then I touch the "login" button
to tap a button, or
Then I fill in "placeholder" with "text to write"
to write something to a textbox.
And the script can be shared by Calabash-iOS and Calabash-Android. That feature is convenient for developers who make both iPhoneApp and Android App.
I thought MonkeyTalk was nice but actually unstable, at least in my environment.
Sometimes MonkeyIDE crashed, so we have to do debug of MonkeyTalk...
I hope this helps you.
MonkeyTalk looks promising. Features from the Gorilla Logic website:
Free & Open Source
Automated testing of iOS, Android, HTML5 and Adobe Flex applications
Cross-platform recording and playback
Test native, web, or hybrid apps, on iOS simulators, Android
emulators or real devices (no jailbreaking required)
Everything from simple "smoke tests" to sophisticated data-driven
test suites
Packet tracing: iOS, Android, Android
Selenium offers drivers for mobile devices and emulators. It is a Google project. They have good documentation. It has an IDE for rapid prototyping of testing suites and support for many languages like ruby, PHP, c#, etc.,
If scripting is your preffered solution on android you can easily import and run scripts after you install the Scripting Layer for Android. Just download the latest apk file, import the script and run it. This isn't available on iOS but half of your problem may be solved with this.
I know this is an old post but any one reading in 2016 first choice for automation should be Appium ( works on both IOS /Android). All the tools mentioned above have to be built with the App. Appium does require any build up with App code. Its hugely popular with variety of programming language support ( PHP/JAVA/RUBY/PYTHON). [Link]: appium.io and [Link]: https://github.com/appium/appium