Selenium IDE: Ignore these errors and go to next step? - selenium-ide

When I run the macro sometimes I get
* [error]
time out when looking for element 'css=button.btn.btn-primary.col-xs-8.m-0-left.m-md-top.m-0-bottom'
* [info]
Test case failed (Runtime 8.86s)
====
Is there a way to ignore these errors and go to next step?
Like: if (notFound) go to next step
PS: I am using the Kantu Selenium IDE.

Related

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project. while 'Run as Maven test'

I am trying to create my own custom rules for Z PL/SQL Analyzer plugin by Felipebz. For that, I am following this tutorial.
I downloaded the mentioned Github Directory in that tutorial and imported it in Eclipse. Now, when I try to Run it as "Maven test", I get Following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project plsql-custom-rules: There are test failures.
There are some more errors in the log:
[INFO] Running com.company.plsql.ForbiddenDmlCheckTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.284 s <<< FAILURE! - in com.company.plsql.ForbiddenDmlCheckTest
[ERROR] test(com.company.plsql.ForbiddenDmlCheckTest) Time elapsed: 0.181 s <<< ERROR!
java.lang.NoSuchMethodError: org.assertj.core.api.Assertions.assertThat(Ljava/lang/String;)Lorg/assertj/core/api/AbstractStringAssert;
at com.company.plsql.ForbiddenDmlCheckTest.test(ForbiddenDmlCheckTest.java:10)
Does someone know any solution to this particular problem?
I want to create a jar for testing it in my SonarQube Server. But, before changing anything in the code, I wanted to test it first as it is; because I reckon that there is a sample rule already provided in the downloaded Project template. I can make further changes in the code once I get to test it as a jar file at first place.
Carefully check build configuration below, targeted xml that include your test objects name should be correct and commands should correct. Configuration example:
Eg for correct way :
clean install -Drelease.testng=inventoryAndWarehouseModuleSmoke.xml
This error may also be due to this.
As Raphael Alves suggested, I solved it by adding the following dependency to pom.xml
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.11.1</version>
<scope>test</scope>
</dependency>
You might want to check for the latest version of this dependency on Maven Repository

sbt new scala/scalatest.g8 fails on TransportException

When I try to create the ScalaTest example with this command:
sbt new scala/scalatest-example.g8 fails on TransportException
I get the following:
[info] Set current project to scala (in build file:/Users/chasrmartin/Dropbox/Etudes/Scala/)
[error] org.eclipse.jgit.api.errors.TransportException: git#github.com:scala/scalatest-example.g8.git: Auth fail
[error] at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
[error] at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)
I've tried several workarounds from around the next (eg this SO question) to no avail. It would seem this has to be a simple problem, I got this command from a beginners tutorial.
Update
I got this command from https://www.scala-lang.org/documentation/getting-started-sbt-track/testing-scala-with-sbt-on-the-command-line.html
This project doesn't seems to exists anymore.
Instead I would prefer to run with the normal scala-seed.g8
> sbt new scala/scala-seed.g8
And add the test classes manually.
This is an equivalent tutorial with the same classes and tests.
The scala seed template already comes with the structure you want, with the test dependency. You can run sbt test normally.

how to get more debugging for sbt compile error? "MethodHandle not found"

Attempting to sbt compile a branch of my project ENSIME (experiment if you're interested) under Java 6 is giving a bizarre compiler warning:
[info] Compiling 48 Scala sources to /home/fommil/Projects/ensime-server/target/scala-2.11/classes...
[error] Class java.lang.invoke.MethodHandle not found - continuing with a stub.
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 18 s, completed 03-Sep-2014 22:57:44
It works under Java 7.
Calling last reveals nothing more than the classpath of the compile (this would be equivalent to setting --debug level).
I've removed all the plugins from the project, and the problem still shows.
If I remove all my code - leaving just the build system and dependencies - with some stub scala entry points then there is no problem.
However, I can't exactly bisect my source code file because then it doesn't compile.
When the code is compiled, a grep (including binaries) of MethodHandle doesn't give any hits (although there is a jdk8 file in the tests resources, it is not relevant because the problem appears if it is removed).
It is only one (big) patch that has caused the problem (the previous commit compiles ok).
How can I debug this further in sbt? it doesn't want to give any more info
is this a known problem, or can anyone make an informed guess what is going on?
It turns out that this was caused by pulling in Lucene, which requires Java 7.
A bit of an epic message fail from sbt: there doesn't appear to be any way to get it to output anything sensible.

Not a valid command: it when executing sbt it

I followed the steps for adding integration tests found at http://www.scala-sbt.org/release/docs/Detailed-Topics/Testing#integration-tests.
However, when I run sbt it, see the following:
$ sbt it
[info] Loading project definition from myproj/project
[info] Set current project to myproj (in build file:myproj/)
[error] Not a valid command: it
[error] Not a valid project ID: it
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: it
[error] it
[error] ^
sbt test works as expected
What's described in Integration Tests is about how to add a new configuration, namely it. There are many configurations available, e.g. Compile, Test, Runtime, Docs, Pom - you can find the default ones as vals in the sbt.Configuration object.
The official documentation of SBT in Selecting the configuration and Scoping by configuration axis should explain why you calling sbt it would require a command or a task with the it name which as it turned out was not the case.
The it configuration binds tasks that you may have used in the other configurations like test be reconfigured so the integration tests are in it directory (rather than in their default one - src/test).
After a bunch of googling, I realized the problem was that integration tests aren't quite the same as tests. To run integration tests, the configuration is slightly different:
sbt it:test
When I do that, everything works fine.

How do I run a maven/eclipse/GWT/playN app in production mode?

There seems to be an issue if you want to launch a playN/GWT/maven app from eclipse in production mode using the following procedure:
Right click on playn-showcase-html and select Goolge-GWT Compile
Compiling module playn.showcase.Showcase
Resolving com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator
Found type 'com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator'
Found type 'javax.validation.constraints.DecimalMax'
[WARN] Detected warnings related to 'javax.validation.Constraint'. Is validation-<version>.jar on the classpath?
Specify -logLevel DEBUG to see all errors.
[WARN] Ignoring unresolvable annotation type javax.validation.Constraint
Compiling 1 permutation
Compiling permutation 0...
Compile of permutations succeeded
Linking into /Users/bryan/dev/playn-samples/showcase/html/target/playn-showcase-html-1.0-SNAPSHOT/showcase
Link succeeded
Compilation succeeded -- 19.459s
Anyone know what these warnings are about?
Right click on playn-showcase-html and select Run As web application
Go to URL http://127.0.0.1:8888/Showcase.html in your browser and you'll get an error that says GWT module 'showcase' may need to be (re)compiled.
The only way around this appears to be if you swap steps 1 & 2, but that just seems backwards. I think the problem is that the when you run the web app from eclipse that the gwt maven plugin is compiling/deploying the artifacts again which step on your previous GWT compile step.
Anyways, this isn't a huge deal since you can reverse the order of steps to get it to work, but I was just curious if anyone has found a solution to this.
I suggest that you try to compile/run it with maven directly, not through Eclipse, first go to the root directory of your game and do the following:
mvn clean package
that should compile your game without problems, and then
mvn test -Ptest-html
and that should run your game in http://localhost:8080/
Hope this helps, and I strongly suggest that use maven directly whenever you can, because Eclipse has a lot of incompatibility problems with some things.