Comments (23)
Comment by mario-ortiz
Wednesday Dec 23, 2015 at 21:54 GMT
This integration would be great. Are there any news about this?
from chimpy.
Comment by samhatoum
Wednesday Dec 23, 2015 at 23:28 GMT
If you start all the tools manually, you can connect chimp to appium using --host
This is a lot of work for us to do right now, maybe a PR though :)
from chimpy.
Comment by mario-ortiz
Tuesday Dec 29, 2015 at 22:19 GMT
thank you Sam
from chimpy.
Comment by DutchRican
Wednesday Jan 27, 2016 at 17:25 GMT
Does anyone have a working example for this?
Only specifying the host is throwing an error that the deviceName and platformName are missing. I tried to specify those over the appium CLI, but this is not working for me.
Setting these values in the CLI for Chimp is resulting in an error:
setupBrowserAndDDP -- TypeError: Cannot read property 'toLowerCase' of undefined
from chimpy.
Comment by mario-ortiz
Wednesday Jan 27, 2016 at 17:30 GMT
I actually had to make some changes to the chimp_helper.js file, but it's working great after that. Not sure if the best solution tho.
Go to node_modules\chimp\lib and open chimp_helper.js
Then, after line 110 I added this code
if (process.env['chimp.platform'] === 'Android' ||
process.env['chimp.platform'] === 'IOS') {
webdriverOptions.desiredCapabilities.platformName = webdriverOptions.desiredCapabilities.platform;
webdriverOptions.desiredCapabilities.deviceName = webdriverOptions.desiredCapabilities.name;
}
And after that I could integrate with appium perfectly.
from chimpy.
Comment by DutchRican
Wednesday Jan 27, 2016 at 19:41 GMT
Thank you Mario!
The line count is not accurate any more. Right above the log output what the webdriveroptions are should be fine.
I had to modify your suggestion to this:
if (process.env['chimp.platform']) { webdriverOptions.desiredCapabilities.platformName = webdriverOptions.desiredCapabilities.platform; webdriverOptions.desiredCapabilities.deviceName = process.env['chimp.deviceName']; }
from chimpy.
Comment by the-boletus
Tuesday Feb 16, 2016 at 15:28 GMT
Modifying the existing code does not feel right though. :) Well, it makes the deployment procedure difficult. But there is a piece of code in the same chimp_helper.js saying about "customChimpConfigPath":
if (fs.existsSync(customChimpConfigPath)) {
var customChimpConfigurator = wrapAsync(require(customChimpConfigPath));
global.browser = customChimpConfigurator(global.sessionManager);
...
I haven't found any information about the config file. What's the config's structure and could we use it for setting desired capabilities?
from chimpy.
Comment by Sanjo
Tuesday Feb 16, 2016 at 15:39 GMT
@the-boletus Yes, I think that was the purpose of the customChimpConfigPath option. To start with the file would roughly contain:
module.exports = function (sessionManager) {
// Modified version of: https://github.com/xolvio/chimp/blob/master/src/lib/chimp-helper.js#L95-L136
};
from chimpy.
Comment by mario-ortiz
Friday Feb 19, 2016 at 22:34 GMT
Thank you @sanjo, one quick question. I already copied the lines that you mentioned to my new chimp.js file, but I'm not sure what should I return from this file for the platform to work. I tried returning the 'return remoteSession(webdriverOptions)', but doesn't seem to work. Unless I change the chimp-helper line from this
var customChimpConfigurator = wrapAsync(require(customChimpConfigPath));
global.browser = customChimpConfigurator(global.sessionManager);
to this
var customChimpConfigurator = require(customChimpConfigPath);
global.browser = customChimpConfigurator(global.sessionManager);
(this one works like a charm, but again I had to change the chimp-helper.js file).
So it seems I need to return it in a specific way, but I haven't been able to found the right way to do it.
from chimpy.
Comment by Sanjo
Friday Feb 19, 2016 at 23:16 GMT
Oh the expected custom function must be a function with a callback. The correct signature is:
module.exports = function (sessionManager, callback) {
// Modified version of: https://github.com/xolvio/chimp/blob/master/src/lib/chimp-helper.js#L95-L136
var remoteSession = wrapAsync(sessionManager.remote, sessionManager);
callback(null, remoteSession(webdriverOptions))
};
Maybe we can change this to a sync style function before 1.0. (And add the documentation).
from chimpy.
Comment by mario-ortiz
Monday Feb 22, 2016 at 19:41 GMT
Thank you @sanjo, working great now. I just changed
callback(remoteSession(webdriverOptions))
for
callback(null, remoteSession(webdriverOptions))
Thank you very much.
from chimpy.
Comment by Sanjo
Thursday Feb 25, 2016 at 20:07 GMT
I have added a documentation page for the custom WebDriver configuring.
from chimpy.
Comment by andyhite
Friday Mar 18, 2016 at 23:34 GMT
Unless I'm totally misunderstanding this, the custom webdriver stuff doesn't seem to work for me. The --customChimpConfigPath
CLI option does nothing - there doesn't even appear to be anything in the chimp
bin file for it.
from chimpy.
Comment by samhatoum
Friday Mar 18, 2016 at 23:44 GMT
I think you might be right. Looking here:
https://github.com/xolvio/chimp/blob/master/dist/lib/chimp-helper.js#L76
It looks like that's the variable name and not the option name. Tracking bug here:
xolvio/chimp#310
from chimpy.
Comment by andyhite
Friday Mar 18, 2016 at 23:47 GMT
Good to know I'm not going crazy :-P
I was able to get around this by just dropping the file with the callback into features/chimp.js
, so it's not a huge issue for now.
from chimpy.
Comment by gbhatnag
Thursday Mar 24, 2016 at 20:34 GMT
Will adding the custom WebDriver config alone add support for Appium? I don't see options related to Appium or mobile testing available in the WebDriver config docs. I'm new to the Chimp / Appium worlds and need a way to test Cordova mobile apps that we've created for a Meteor app. I've got Chimp set up, connected to my Meteor app and can run tests against the server. I'm now interested in testing the web.cordova
UI (on iOS and Android) and all the Appium mobile APIs available through WebDriver here look like just what I need.
Could someone point me in the right direction (docs, tutorials, videos, other) to get this combo of Meteor + Chimp + Appium set up?
from chimpy.
Comment by gbhatnag
Thursday Mar 24, 2016 at 21:37 GMT
I should add: we don't need to test directly on an iOS or Android device just yet. Simulators are just fine.
from chimpy.
Comment by gbhatnag
Tuesday Mar 29, 2016 at 21:43 GMT
Any suggestions here? Using Chimp thus far is going well and looking forward to testing our Cordova apps.
from chimpy.
Comment by PierreCBSI
Thursday Apr 21, 2016 at 23:00 GMT
running Chimp on my desktop, would like to see more details about connecting with Appium - maybe an official page?
from chimpy.
Comment by wojtkowiak
Tuesday May 10, 2016 at 14:18 GMT
I am also very interested in it.
@samhatoum Could you expand a little bit this one, to have it described step by step?
If you start all the tools manually, you can connect chimp to appium using --host
from chimpy.
Comment by ktoley
Saturday Aug 20, 2016 at 01:01 GMT
It looks like you can specify Appium setting in a Chimp config file:
//- - - - Appium connection - - - -
'platformName': 'Android',
'platform-name': 'Android',
name: 'Appium Server',
deviceName: "emulator-5554",
host: 'localhost',
port: 4723,
app: "BasicSample/app/build/outputs/apk/app-debug.apk",
but the Appium server throws an error requesting platfromName and app to be specified in the capabilities. It does not seem to pick up those values from the Chimp config file.
If you pass those properties in via the cli when starting Appium it looks like Chimp works. You can for example launch the apk however, overriding the settings with desiredCapabilities does not.
rem cli
appium --device-ready-timeout 7 --address 127.0.0.1 --port 4723 --platform-name Android --avd Nexus_5_API_ 23_x86 --app BasicSample\app\build\outputs\apk\app-debug.apk
If you run in verbose mode it looks like webdriverio gets the desired capabilities options but they don't get passed to the server.
module.exports = {
routeTo: function (route) {
var driver = require('webdriverio');
var basePath = "BasicSample/app/build/outputs/apk/";
var route = (typeof route === 'undefined') ? 'app-debug.apk' : route ;
var cl = driver.remote({
port: 4723,
logLevel: 'verbose',
desiredCapabilities: {
'appiumVersion': '1.5.3',
'deviceName': 'Nexus_5_API_23_x86',
'device-orientation': 'portrait',
'platformVersion': '6.0',
'platformName': 'Android',
'app': basePath + route
}
});
return cl;
}
};
client = require('./router').routeTo();
client.init(); // opens default apk
So for example you can't switch to a different apk or change device-orientation for a test.
Is there a work around in the config to address this or another solution. I would like to avoid modifying the Chimp source if possible.
from chimpy.
Comment by martinhbramwell
Saturday Jun 17, 2017 at 11:23 GMT
The main page of the docs refers to support for Appium, but the conversation above is the only documentation I can find for it!
Is there are public git repo somewhere, where I can see an example of Chimp driving Android tests?
My immediate goal is to run my first Cucumber test of a WebView app in a simulated Android device in CircleCI. If there's no single documentation for that, I would really appreciate a concise reading list.
from chimpy.
Comment by egorvas
Wednesday Jul 11, 2018 at 07:46 GMT
Hi, any updates in this area?
from chimpy.
Related Issues (20)
- Node 10.1.0, Chimp and fibers problem (can we upgrade fibers?) HOT 33
- Hooks errors fix for #687 HOT 5
- Security vulnerability HOT 5
- Chrome render issue with chimp
- Make chimp work with JDK10 HOT 6
- Difference between this repo(Chimpy) and Chimp HOT 4
- wrapAsync is not defined HOT 2
- Problems running chimpy on Gitlab `Error: unknown error: Chrome failed to start: exited abnormally` HOT 6
- Chimpy doesn't appear to support Sauce Connect (which is required for testing non-public apps via Sauce Labs)
- Output still references to chimp and outdated website.
- Support latest version of Chrome! HOT 6
- I can't run the unit tests for Chimpy HOT 4
- Using import syntax in config file throws error
- Chimpy crashes upon app server restart with --ddp flag HOT 2
- chromedriver 2.46.0 download URL invalid
- Adding chimpy as dev-dependency breaks app HOT 2
- node 12: bump fibers dependency HOT 13
- cannot install dev-dependencies -> jest-cli dependency is invalid
- Lots of warnings on deprecation of packages with Node 11.10.x itself HOT 2
- Project Abandoned, future of this project? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chimpy.