How to fix nightwatch acceptance tests on Fedora 20 (server)? - fedora

Now I trying to perform Selenium + Nightwatch.js + Mocha.js acceptance tests on Fedora 20.
And it cause so many errors.
But the main problem is:
client.setValue("input.hidden-file", require('path').resolve(__dirname + '/file.jpg'))
This code is not working on Fedora(server), but on OS X, Windows 7, Fedora(desktop) it works fine.
File which I trying to set is exists and path to file specified properly.
Any suggestions?

Related

Selenium Timedout Exception while running test cases from Jenkins

Am running a set of test cases from Jenkins. All the test cases are failing with org.openqa.selenium.TimedoutException on all the functions. I have tested the same code using eclipse in local and its executing fine. Please check on the below error and help on resolving this issue
Configurations:
Selenium- standalone - jar - 2.53
Chromedriver - 2.36
Chrome Browser - 65
testng jar = 6.8
Code Sample:
WebDriverWait wait = new WebDriverWait(driver, 1000);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(ORCollection.get("BtnMDUEligibilityClick").toString())));
WebElement el = driver.findElement(By.xpath(ORCollection.get("BtnMDUEligibilityClick").toString()));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", el);
WebElementClick(" ",ORCollection.get("BtnMDUEligibilityClick").toString());
Thread.sleep(10000);
Logs:
org.openqa.selenium.TimeoutException: Timed out after 40 seconds waiting for visibility of element located by By.xpath: //button[contains(#class,'js-submit')]
I have increased webdriver.wait value in code from 40 seconds to 1000 but still we are getting the same error as Timedout.
I assume that your XPath expressions are correct and you can manually open the browser on the Jenkins slave machine.
The issue could be connected with the lack of interactive desktop. This could happen if you have installed Jenkins on the slave machine as windows service. The recommended for Windows way to control a Windows slave is by using Launch slave agents via Java Web Start. More info here and here.

apache drill "no current connection" error

I am using the most recent version of drill on windows machines in embedded mode. However, I always get "no current connection" errors when sending any queries. Also, the web server localhost:8047 does not work either. Here is what I see when I try to start drill.
I have tried both Java JDK 8 and 9, on two separate windows machines and got the same error. I searched about this matter but could not get any workarounds so far.
Any fix to this? Thanks a lot!!
Problem solved by setting JAVA_HOME correctly.
Here's another clue that might help others!! I had the same problem "No current connection" on Windows 10 and went around in MANY circles trying to solve it by:
Making sure JAVA_HOME was set properly - ok
Checking in the cmd window to make sure I could cd %JAVA_HOME% - ok
Making sure I had added %JAVA_HOME%\bin to the PATH - ok
Checking in the cmd window to make sure I could cd %JAVA_HOME%\bin - ok
Trying to find conflicting JARs - there were none anywhere
Finally, I solved the problem: USE JDK VERSION 7 or 8
I blew away my version 9, reinstalled version 8, set JAVA_HOME again, and then started Drill with sqlline.bat -u "jdbc:drill:zk=local"
I tested it and got this!!!
0: jdbc:drill:zk=local> SELECT version FROM sys.version;
+----------+
| version |
+----------+
| 1.12.0 |
+----------+
1 row selected (1.326 seconds)
Hadoop-3.1.2: Datanode and Nodemanager shuts down
Stuxen in the above thread provided the exact solution and it worked for me.

LIBGDX ios simulator crash. LibGDX / Robovm compiles for 64bit instead of 32bit. What should I do?

My libgdx app starts up on ios simulator and shows ios intro libgdx pic, then crashes.
I get:
[ERROR] Session could not be started: Error Domain=NSPOSIXErrorDomain Code=3 "Unable to run app in Simulator" UserInfo=0x7f853960ff60 {NSUnderlyingError=0x7f8539464ff0 "Failed to lookup the process ID of se.myapp.IOSLauncher after successful launch. Perhaps it crashed after launch.", NSLocalizedFailureReason=An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3), NSLocalizedDescription=Unable to run app in Simulator}
Seems to be related to trying to run 64bit on iPhone 4s, where it is not supported. Does anyone know how to turn off 64bit for robovm in libgdx?
If I change the ios-sim command:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86_64/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
To:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
It works with the old robovm. But for the new version it seems those directories aren't even built at all, so it fails.
Where should I specify the architecture? There is:
<arch>thumbv7</arch>
in robovm.xml but it doesn't seem to do anything?
Has this anything to do with the eclipse integration plugin (I am running from eclipse)?
OK I found out (after about 12 hours of digging)!
I looked in the wrong place all the time. The solution is (in eclipse) to go to Run Configurations / iOS Simulator App / Choose a device and select 32-bit (x86).

cannot run Selenium tests on some browsers

i have tests made with Mink using Selenium 2 driver. everything is working OK under Windows 7 with Firefox, Chrome and IE and Ubuntu 12.10 with Firefox. the problems are:
when i try to run test on Opera (Windows 7) it launches but it cannot find any element on the page - the test fails.
when i try to run test on Chrome (Ubuntu 12.10) using chromedriver - the system returns an error "An unknows server side error occured while processing the command".
when i try to run test on Opera (Ubuntu 12.10) - the system returns an error "No response in timely fashion".
what am i doing wrong? how can i make work Opera in Windows and Opera and Chrome in Ubuntu?
p.s. i use system as Selenium Grid 2
For me on Windows it work:
java -jar "c:\selenium-server-standalone-2.35.0.jar" -forcedBrowserMode "*googlechrome c:\Program Files\Google\Chrome\Application\chrome.exe"
May be for u:
java -jar "c:\selenium-server-standalone-2.35.0.jar" -forcedBrowserMode "*opera c:\Program Files\pathToOpera.exe"
It might be a matter of Operative System as well.
I am developing on a Windows machine and my colleagues are working on Mac.
They had just included the chrome driver for mac, so tests didntĀ“t work on my computer.
I had to do this:
if (OS.indexOf("win") >= 0) {
System.setProperty("webdriver.chrome.driver", "src/test/resources/selenium_drivers/chromedriver.exe");
} else if ((OS.indexOf("mac") >= 0)) {
System.setProperty("webdriver.chrome.driver", "src/test/resources/selenium_drivers/chromedriver");
}
Two different driversa that you can find at http://chromedriver.storage.googleapis.com/index.html

CORBA exception when running from a Mac OS X 10.6 64 bit macbook

I get a weird exception while using CORBA ACE/TAO. I am trying to run a service written in Java that sends/receives messages from clients.
When I run the same code in Windows 7 32-bit it works fine! I exported an executable jar file and tried to run it on my mac, but the problem was still there.
The exception I get is the following:
Dec 7, 2011 6:43:52 AM com.sun.corba.se.impl.naming.namingutil.CorbalocURL badAddress
WARNING: "IOP00110603: (BAD_PARAM) Bad host address in -ORBInitDef"
org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
at com.sun.corba.se.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:114)
at com.sun.corba.se.impl.resolver.ORBInitRefResolverImpl.resolve(ORBInitRefResolverImpl.java:31)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:20)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1151)
at ami.ImplRepoClient.<init>(ImplRepoClient.java:23)
at ami.Famine.initialize(Famine.java:22)
at ami.Famine.initialize(Famine.java:12)
at test.Test.main(Test.java:45)
Exception in thread "main" org.omg.CORBA.BAD_PARAM: vmcid: SUN minor code: 603 completed: No
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:148)
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(NamingSystemException.java:166)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.badAddress(CorbalocURL.java:104)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleColon(CorbalocURL.java:140)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.handleIIOPColon(CorbalocURL.java:115)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.<init>(CorbalocURL.java:67)
at com.sun.corba.se.impl.naming.namingutil.INSURLHandler.parseURL(INSURLHandler.java:41)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:114)
at com.sun.corba.se.impl.resolver.ORBInitRefResolverImpl.resolve(ORBInitRefResolverImpl.java:31)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:20)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1151)
at ami.ImplRepoClient.<init>(ImplRepoClient.java:23)
at ami.Famine.initialize(Famine.java:22)
at ami.Famine.initialize(Famine.java:12)
at test.Test.main(Test.java:45)
In both cases I use java 1.6. The java version in my mac is "build 1.6.0_29-b11-402-10M3527"
Does anybody have any idea of what the problem could be??
Thanks,
Dimos.
Probably your Mac can't resolve the address you pass with -ORBInitDef. Try to ping the server manually and see if that works.