PAF script in headless mode - ipaf

I am running my script in headless mode and I'm hitting errors that don't occur when I run the same in Non-Headless mode. Can I execute Pace Automation Framework script in Headless mode?

Yes, you can execute PAF script in headless mode.
To run chrome in headless mode, following property needs to be set in init.properties file.
browser=Chrome execute.headless=true
chrome and Firefox headless browser is available in PAF. If you want to execute script in other headless browsers, you can create custom drivers for that. PAF will support custom drivers.

Related

Cypress.io: Is it possible to create reports when the tests are executed in graphical mode?

Is it possible to create mochaawesome-reports, when the tests are runned in graphical mode?
All tutorials I have found so far, show it only in conjunction with the headless mode.

Jenkins GUI Automaion script execution

I am new to Jenkins. My query is
What I am trying to achieve.
1) We have automation framework (GUI kindoff). Which will trigger UFT / Selenium Scripts.
2) I have installed Jenkins.
3) I need to run some batch commands which will execute UFT scripts via built in framework.
4) When running via command line I am able to trigger scripts (UFT).
5) From Jenkins I am not able to run GUI commands.(It should trigger my framework and start UFT script execution)
Please note:
Build is success. I am doing all this from Master Jenkins. no slave machine.
Is it necessary to have slave machine to run GUI
I tried almost all settings by searching google.
Please help.
thanks in advance.
Abhijit
if you are using webdriver in your selecium script thats requires UI to be success than you have to consider using Slave which will have UI support and you need to connect there via Xvnc or something similar
if you are using webdriver which does not require UI (for example google chrome headless) then there should be some miss configuration in jenkins side, therefor to help you figure it out you need to provide more details

Starting webDriver endpoint in current users's desktop from linux through powershell

I have a test cluster that contains a linux machine, an iMac and a windows 7 PC.
The linux machine hosts junit tests that I wrote and the other two machine serve as endpoints for browser automation tests using webDriver.
The script that executes the junit tests loops through different browsers and executes the junit tests against each browser using selenium webDriver. So far, the browsers include iphone, ipad, safari (mac), firefox (mac), chrome (mac), IE10 (win7), firefox (win7), chrome (win7).
While developing this test cluster, I encountered random crashes of webDriver on each of the two endpoints and found it necessary to write a kill/restart of the webDriver jar file. Now, this was a relatively simple matter on the iMac, but on the Windows 7 PC this is proving to be extremely difficult.
The linux machine has a script that checks to see that the webDriver endpoint is available by checking http://windows.Host:4444/wd/hub/status and if it isn't, it shells into powershell on the Windows 7 PC (I have freesshd setup to point to powershell instead of cmd.exe) and runs these commands:
Stop-Process -name java
Start-Process -FilePath C:\webDriver.bat
webDriver.bat contains:
java -jar C:\selenium-server.standalone-2.33.0.jar
Here is the problem I am having:
when powershell restarts webDriver using the above comands, the wedDriver endpoint is reachable but not visible. My tests proceed but fail because the browser is not running in the current desktop but instead some virtual one or another users Desktop. When I run webDriver.bat manually, webDriver runs in a cmd.exe window and the tests execute against all win7 browsers fine, providing webDriver doesn't crash.
Here is my question:
How do I make webDriver execute in such a way that my tests proceed and run correctly, rather than in the background/another user's desktop? These tests are part of Build Verification and need to be run on demand, so having someone manually run webDriver.bat is not an option.
I previously tried to have webDriver's jar running as a service and using samba to restart that service as needed, but ran into the same problem. Powershell seemed to be a better alternative with better control and the ability to verify that the jar file is running, but I don't know if I am heading in the wrong direction here.
I don't relish having to learn powershell to accomplish something that was relatively easy on another OS, but understand that this may be my only option. I also know that the commands I'm using do not constitute a good script and welcome suggestions on how to better achieve my goal here.
Thanks.
Sounds like you just need to pass the host option like so:
java -jar selenium-server-standalone-2.37.0.jar -host 0.0.0.0
Powershell might have permission restrictions on binding to all ports that can be overcome by setting the correct policy. See my blog post here for ideas.
You question is pretty long winded...can you shorten it?

Jasmine in windows command-line

How to run jasmine from command-line using a Windows machine ? I have seen jasmine scripts run in Linux. I want jasmine standalone in command-line without phantomjs or any other javascript code that mocks the server(I need jasmine only, if possible with maven).
I'm lost... Assuming the question is "can I run JavaScript on default Windows install, can I run tests with Jasmine this way"?
CScript/WScript will run JavaScript, both a part of default Windows install (I believe starting W2K or WinXP).
You can also compile JavaScript with .Net compiler (JSC.exe) again available on most machines (.Net is not default on WinXP - so may not be present, Windows Vista/7/8 come with a version .Net by default).
Note that JavaScript by itself has nothing to do with browser and both above tools are not going to provide you any support for browser objects. You can run logic code/manipulate files and configuration, output text.
There is some chance that Jasmine can be run from command line without browser objects - try yourself if you goal is running non-browser related JavaScript from Windows command prompt.
There is also option to automate IE and run script there (again default IE may not be latest version - but Windows 8 comes with IE 10 - should be enough for most browser related tests). You should be able to write your own automation framework (similar to Selenium) if needed, even using JavaScript...
Sample JavaScript to run with CScript /nologo launchIE.js from command prompt:
// save as launchIE.js
WScript.Echo("Launching IE to Bing"); // outputs text to console
var oIE = new ActiveXObject("InternetExplorer.Application.1");
oIE.Visible=1;
oIE.Navigate("http://www.bing.com");

firefoxProfileTemplate doesn't prevent certificate prompt in Mozilla

I am running Selenium Server. I'm also launching an automated test script that I exported from the Mozilla Selenium IDE and exported to my Java client driver program which I compiled and ran in Eclipse using JUnit 4.8. Two windows start up in Mozilla (since I'm using the "*chrome"/Firefox argument when instantiating my browser window object from the Java program). One window looks like it contains logging information of some kind, and the other window is the actual automated test browser window.
Here's how I'm starting the Selenium Server.
cd C:\Program Files\Java\jdk1.6.0_26\bin\Selenium
java -jar .\selenium-server-standalone-2.0rc3.jar -interactive -firefoxProfileTemplate "C:\Users[Windows-Login]\AppData\Local\Mozilla\Firefox\Profiles\lcllklng.default"
The server starts up fine. The reason I put the -firefoxProfileTemplate attribute into the start-up command because I kept getting the untrusted certificate in Mozilla. I guess this is supposed to default my Windows login Mozilla profile. However, it didn't work. I have to click through the prompts each time I run my test cases. Is there a way to make it avoid the untrusted certificate? Could it be because I'm running Windows 7?
You'd also be my hero if you can help me avoid this for IE, Google Chrome and Safari. But only if you feel helpful today. Thanks!
Switch to WebDriver to avoid this.

Resources