How to configure headless browser using protractor on windows so that it can be run using team city without any GUI resolution issues? - node.js

How to configure headless browser using protractor on windows so that it can be run using team city without any GUI resolution issues?
Currently I am using chrome browser to run my UI automation test but at some page I am facing element not found issue due to resolution issue.
So I wanted to go for an headless browser.
Thanks.

Phantomjs is officially discontinued, so you must use headless Chrome. As for the instructions on how to set it up, follow instructions
Getting started with headless chrome can be found here

Related

PhpStorm looks for Google Chrome when I set up Firefox

PhpStorm 2021.2.2 on Ubuntu 20.04. I set up a Run Configuration as follow:
But when I launch this Run Configuration I get:
I don't understand why it look for Google Chrome if I selected Firefox as a browser.
Sadly that is correct / no error here.
JavaScript debug is done with Chrome-based browsers only (has been like that for quite some time now).
https://www.jetbrains.com/help/phpstorm/2021.2/run-debug-configuration-javascript-debug.html
https://www.jetbrains.com/help/phpstorm/2021.2/debugging-javascript-in-chrome.html
Debugging of JavaScript code is only supported in Google Chrome and in other Chromium-based browsers.
To debug JavaScript using Firefox you need to use Firefox Remote type of Run/Debug Configuration (need to manually create and use it) and enable Remote Debugging in Firefox in advance. https://www.jetbrains.com/help/phpstorm/2021.1/debugging-javascript-in-firefox.html has all the info.
A ticket to watch after: https://youtrack.jetbrains.com/issue/WEB-14987
NOTE: the aforementioned Firefox Remote type of Run/Debug Configuration is no longer present in current 2021.2 version. The last version that has it is 2021.1.
In addition to the above, from https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010846880/comments/360003174860
Unfortunately, there's nothing we can offer for debugging in Firefox now :(
We used to support Firefox Remote Debugging (but without source maps) through the Firefox Remote run configuration, but our solution doesn't work in the latest Firefox versions due to changes in the protocol, and there doesn't seem to be an easy way to fix it. We've made some progress recently, but there are still some blocking issues.
Related tickets:
https://youtrack.jetbrains.com/issue/WEB-45986
https://youtrack.jetbrains.com/issue/WEB-48076
https://youtrack.jetbrains.com/issue/WEB-2337

Selenium automation PAF

I am looking for automation testing on iOS, have got to know of ipaf.
Will Pace Automation Framework support automation on latest firefox browser.
Any idea anyone?
in the init configuration file please use below configuration to execute your test in firefox.
browser=FireFox
PAF supports FireFox browser, so it should work on the latest FireFox browser.

How can one install linux google chrome binary on a Mac?

I have a Django app that web-scrapes (using Selenium) that I am trying to deploy to google cloud. I am having issues with opening Chrome driver in the virtual environment on google's servers. I believe they are Linux.
I was able to install the linux version of Chromedriver into the virtual environment but I am getting a "cannot find Chrome binary" error as pictured:
https://imgur.com/a/Ib3x0ZW
I have done some research and it seems that this is because Google Chrome is not installed in the virtual environment. The links to install Google Chrome online all force me to download macOS versions.
How can I download Google Chrome (specifically its binary) on my Mac so I can put it in the virtual environment that will be run on linux?
I think that StackOverflow is not the proper place to ask for this kind of question.
You could try to find your problem in the following Google Chrome Help page.
If you don't find the answer in the previous link, you could ask for help in the Google Chrome Help Community.

How to preinstall Chrome extension in Microsoft Chromium Edge?

Microsoft Chromium Edge is the new web navigator of Microsoft. It shares the same Chromium base as Google Chrome. Thanks to that, it supports Google Chrome Extension.
But I cannot find how to automatically install Google Chrome extension at the same time as Edge installation. Any help ?
The context of my question is partial deployment in a big enterprise. I've searched in Microsoft documentation without success until now.
Microsoft Edge (Chromium) browser is still in development stage and it is not officially launched yet.
The beta version of the browser is available for download which user can download from link below.
Download MS Edge Chromium beta browser
At present, it is not possible to preinstall the Chrome extensions in Edge chromium browser while installing the browser.
If you want to install the Chrome extensions in Edge chromium browser than you can refer the link below.
Install Chrome Extensions in Microsoft Edge Chromium
I will take your requirement as a feature request for this browser and try to submit it via our internal channel.
Thanks for your understanding.

Is it possible to run Magento TAF (Test Automation Framework) on Linux?

I'm trying to configure Magento TAF on Ubuntu, following the Installation Guide pdf.
I read on it...
Current version limitations:
Remote tests executing
UNIX running Usage
Firefox profile through configuration file
...but I feel skeptical :)
There is a main shell script prepared (runtests.sh)
if I configure everything and I execute selenium RC and runtests.sh, firefox browser opens... (but stands on empty page).
Furthermore: there are several inconsistences on the Installation Guide, that's why I suspect that Linux restrictions perhaps are deprecated. For example: on page 2 says...
At the base level, Magento Test Automation Framework will require the
following software: (...)Selenium RC 2.0.3
... but on page 4...
Download and install Selenium RC 1.0.3 (...).The latest available
version is 2.x, Download Selenium RC (Now available NEW 2.0b), but
automated test cases will probably not work with it.
The question: Is it possible to run Magento TAF on Linux?
Thanks!
Yes, it is possible.
I had the same problem using Selenium Grid in version 1.x.
Download Selenium Driver (Selenium 2). I got the tests running in Debian without modifying runtests.sh.
If you plan to test with several OS / browsers you can find a quick start tutorial for Selenium Grid 2. This may be helpful if you host your Magento code on a linux webserver. It's much easier now to set up the grid than it was with Selenium 1, fortunately.
Launch the server with
java -jar selenium-server-standalone-2.15.0.jar -role hub
By default, the server will run on port 4444. You can start the server on a Linux box without a desktop environment (e.g. a development web server).
Then you set up boxes with desktop environment (e.g. a Windows machine and a Linux machine). Now you download the server standalone library for every machine and start the client:
java -jar selenium-server-standalone-2.15.0.jar -role node -hub http://192.168.1.2:4444/grid/register
You have to change the IP to the IP of your Selenium server (and change the port if you did so in the first command). By default, the client will run on port 5555. If you want to use another port for the client or if you wish to start several client instances, you can define custom ports using the -port switch.
Note: don't care too much about the software versions mentioned in the document at all. It seems to be a bit outdated.
The latest public release works fine on Ubuntu/Debian pretty much out of the box, but the documentation is Windows-orientated.
We got the tests running on a headless Selenium installation using Google Chrome on Ubuntu server 11.04 64bit. Screen-shots are only possible when using Firefox, but Selenium requires version 3.6 of Firefox, so we'll need to downgrade the Mozilla browser to enable that.
[Update: March 27th 2012] We tried again with Firefox 10 after upgrading our packages and to our biggest surprise, it worked! We've now got screen-shots!
I wrote a tutorial (updated March 27th 2012) that outlines installing a fresh headless Selenium environment with Magento TAF on Ubuntu Server. Hope that helps.
Yes, this is possible.
I made a init script selenium-headless that simplifies running the TAF on a server.
The TAF project is under development, this is just a preview was published. The team wanted to share ideas and give valuable benefits (automatic tests) for everyone, who is developing for Magento. TAF will have changes, it will be restructured and polished before the official release.
The docs are outdated a little, they give general overview of the tests usage. Currently TAF can be run on both Windows and Linux, and both Selenium 1 and 2 can be used to run them.
Summary
Yes, TAF can be run on Linux.
Do not mind documentation inconsistences
If tests do not run - re-check your configuration and Selenium installation.
P.S. And sorry for issues - this version is just a working draft. It will be improved, documentation will be proof-read and informative messages will be provided.
Thanks for using TAF, anyway :)

Resources