My Hybrid android app is built with angularjs library with lots of Asynchronous calls all over. How can I integrate Appium with Protractor, so that I can check for complete page loadings including asynchronous calls and other data bindings. My app is developed and ported as APK and not browsed in a browser. Am able to execute my selenium scripts but asynchronous calls is the place where I have stuck.
Please help me.
As of now Protractor doesn't officially support appium configurations. However there is a help file that is available in Protractor docs. All you need to do is update your conf.js file to include the appium configurations and remember to start your appium server before you run the test script.
To your question, you need to have below points ready -
Start your avd
Install the .apk file in your avd that you will be invoking through appium
Start the appium server using command - appium &
Update your protractor conf.js file to include appium android/chrome configurations. More details about configurations can be found in the below link.
Here's the link to it - Protractor-Appium Setup
Related
I have a UI test framework written in Selenium WebDriver JS, with test scenarios in Cucumber.js. I'm having an occasional issue when running these tests in Chrome and using the experimental --parallel CLI option. I tend to use --parallel 5 to speed up the overall execution time of the tests and this works well in all other browsers than Chrome, where the tests will sometimes end suddenly with the message
Error: EADDRNOTAVAIL connect EADDRNOTAVAIL 127.0.0.1:60730 - Local (0.0.0.0:0)
At that point the browsers remain open but the Cucumber process ends.
I know the --parallel option is experimental but I can find no other mentions of this online so I want to make sure I'm not doing something stupid.
I'm using:
Chrome 73.0.3683.103
ChromeDriver 73.0.0
Cucumber 5.1.0
Selenium WebDriver 4.0.0-alpha.1
(installed from npm).
This is on macOS 10.14.4 if that makes a difference. I can replicate this on other machines with the same OS version too, have not got a Windows machine to hand to try.
I suggest instead of using Selenium WebDriver JS with Cucumber that you use Protractor with Cucumber. Protractor is a JS wrapper of selenium and there is a project that has already done all the hard work of combining cucumber and selenium. Protractor has built-in parallel functionality that was built to run parallel browser testing. Check out https://github.com/protractor-cucumber-framework/protractor-cucumber-framework
This was an issue in selenium-webdriver that is now fixed in master.
We have a suite of tests that use Selenium to spawn Chrome instances when run locally. The Chrome instance that gets spawned is a completely vanilla profile with no extensions installed. For debugging purposes it would be useful to have the React & Redux dev tools extensions installed.
Is there a way to configure Selenium to install/enable extensions in the Chrome profile it spawns?
In an ideal world it wouldn't do a full install of the extension every time, but use a locally cached CRX file.
Thanks in advance for any help
#Kiril is right in saying that this question is asked often. You should do a thorough search before posting.
If you are using Javascript+ Selenium do something like this :
chromeOptions = {
'args': ['--test-type',
'--start-maximized',
'use-fake-ui-for-media-stream',],
'extensions': [encode(path.join(__dirname , '/your ext path/yourextention.crx'))],
};
I'm very new to AngularJS. I am trying to automate an angularJS app.
installed node.js
installed protractor (npm install -g protractor)
updated webdriver manager tool (webdriver-manager update)
started the driver (webdriver-manager start)
I create a simple conf.js and spec.js files. Everything works fine and set to go.
when we execute spec.js, protractor talk to selenium webdriver which then launches the browser and does the other stuff like interacting with angularJS app. Am I correct?
So, what is the role of node.js here in protractor?
I might be wrong, if so please do correct me and explain how protractor works.
Thanks in advance :)
Node.js is an open source runtime environment to develop applications in JavaScript.
WebDriverJS has been written in Node.js and Protractor has been written on top of WebDriverJS.
Node.js will be executing the javascript code you've written in your spec and po files with its JavaScript Engine (Google V8), or as you've so colourfully described: "does the other stuff like interacting with angularJS app".
Read more here and here
Protractor is a Node.js application... hence the Node requirement. Protractor is written in Javascript, so it requires a Javascript engine, which Node provides (Google V8), thus allowing it to run on a server.
Node.js is package file we are using in protractor automation tool to run the angular.js based application.It contains selenium and other browser drivers to run our applications in different environments.
Tools: Java, Selenium WebDriver, Maven, Git, Bamboo
I'm not sure how I can run my test-cases under Bamboo which are written by java and build by maven and stored into Git repository. Bamboo can't open a real browser (IE, Firefox, chrome..)
It's worked when I tried to use HTMLUnitdriver (headless browser) instead of a real browser, BUT the problem with HTMLUnitdriver it is not functioning well (actually, it can't run most of the test scenarios even the other browsers do flawlessly).
I've Google it but could not found any good information on how to do it.
I'll really appreciate any help.
You should not run any test on Bamboo server. CI server is not meant to run any tests on. It should only controls how the tests will be executed instead. There are multiple ways to handle this. Selenium Grid is highly recommended. See another thread here on same topic
Use BrowserStack to execute test scripts and download reports/results as part of build as an artefact.
Or specify an agent that has the browser you need to test on.
https://www.browserstack.com/automate
We have Selenium running on a test server. We want to run our Protractor tests from a remote device on the same network without having to install anything (e.g. Selenium RemoteWebDriver). We used to do this by running Angular Scenario runner.html, which would execute our e2e tests in the browser via JavaScript.
Does Protractor + Selenium WebDriver allow us to do the same thing?
Nope. WebDriver has to be run through a Driver (chromedriver, iedriver, firefoxdriver), so it can't just be triggered through the browser.
This removes some convenience, but allows for much better native event firing, and means your application doesn't have to serve runner.html somewhere.