I have a Framework built using Java Selenium Webdriver, when I compile my tests via the IDE the test runs fine but when I use Maven it does not click the login button but no errors are reported. ? My confusion is that by looking at the errors it would seem both work fine. It is when then the window is viewed it can be seen the button is not clicked. Is this expected or has anyone seen this issue before? This Maven build also worked before so I can't understand why it does not now.
Related
Today i'm launching Spring Tools Suite and all my project show errors. Majority of them are "x cannot be resolved to a type". I can ignore them and launch program and it works, but i suppose such things shouldn't happen. I have copy of them, but i want to know what is the source of the issue and how to fix it if it's possible.
The only things i have changed lately in STS was installing Window Builder and Maven, but i doubt any of it should make problems. Actually only 2 projects don't show errors - both use Maven and one uses Window Builder.
I'm using IntelliJ 2018.3 CE. I have a java maven project (developed using springboot) in which the JUnit tests have already been written. However, when I try to run the tests, the output is always shown in the default run window, and NOT in the Test Runner Tab. In fact, I cannot make this window pop-up after a running a test.
I have Junit 4.12 in the external libraries of my project (as Maven: junit:junit:4.12). The test folders have been appropriately flagged as test resources.
I presume it has to deal with settings in IntelliJ but even with all the effort in the world, I wasn't able to find what is causing this.
Is someone experiencing the same issue? Or does someone know how to resolve this?
Any help would be very much appreciated.
I am trying to run my test in eclipse using cucumber BDD with selenium webdriver.
There is no code to paste as there are no errors in my code.The problem is that the cucumber feature file is not getting recognized(with a light green color) and I can see this error "No editor descriptor for id cucumber.eclipse.editor.editors.Editor" .
I expect the green icon to be there so that I can run it as a cucumber feature.Also when I try to run my test by clicking "Run as"-I cant see any option to Run it as a cucumber feature.Looks like some of the features haven't been installed successfully but am struggling to find out which ones!
Versions used: Eclipse oxygen,Java 9,selenium 3.8.0,installed cucumber plugin and with Maven.I have also put the required dependencies in the pom.xml and all the relevant jars are added in the build path. Is there anything I might have missed.Please help. Also do let me know if there is a way to attach screenshots in here so that I can attach it for your reference.
I created my automation code on Selenium 2.44.0
Following code used to work fine
import org.openqa.selenium.interactions.Actions;
Actions action = new Actions(driver).contextClick(element);
action.build().perform();
But now i am getting errors when i try to upgrade to Selenium 3.3.1 version.
Getting following error near important statement:
The import org.openqa.selenium.interactions.Actions cannot be resolved
Getting following error near contextClick:
Multiple markers at this line
Actions cannot be resolved to a type
Actions cannot be resolved to a type
When i look up for documentation found out that Actions class is deprecated, not sure how we can perform right click to get the context menu.
Just tried with selenium-server-standalone-3.3.1.jar and it works absolutely fine.
Actions Class still exists in Selenium 3.3.1, as there is no mention of its deprecation in Selenium 3.3.1 Change Log.
Could you please redownload the latest selenium bindings from SeleniumHQ, and rerun your script.
No need to create new project. just remove the old libs and add updated libs only. if you are using pom file (if it is the Maven Project) then right click on project name then click update maven project. then click "Project" on file menu and then clean your project.
It should work then.
Getting back into Java coding after being away for a while, downloaded the latest Maven (3.1.1), the latest Eclipse (Kepler), the latest JDK (1.7.0_45), created a new Maven project in Eclipse (using the quickstart archetype, which looks like it defaulted to JUnit 3.8.1), opened AppTest.java, selected "Run As JUnit Test" (not JUnit Plug-in Test), and nothing shows up in the JUnit view.
Shouldn't it at least say something like "Runs: 1/1"? If I change the code in testApp() to "assertTrue( false)", then I don't see a failure (although if I debug, sure enough, an exception gets thrown). If I put a println() in the test, I see its output in the console view. If I run mvn test from the command line, I get a lovely stacktrace and the word "FAILURE!" (and my println() output).
So. Something basic is wrong somewhere, but what?
Maybe you checked the "Show Failures Only" option? (on the same bar as "Rerun Test"). It happened to me :)
I think I repeat your problem. It happens when the JUnit window is opened initially in eclipse (for example I detached the view as separate window and it shows when eclipse starts).
With fresh start (window/view shown) I run tests and don't see anything in it, when I close it and run unit tests (via 'run as') window reopens but now results are shown.