We created our Selenium Test Cases in the Selenium IDE and they also worked there.
Now I'm trying to integrate them into the the GTWproject to make automated test after every build with Ant.
This is how i implemented the setup:
@BeforeClass
public static void setUpOnce() throws Exception {
SeleniumServer seleniumserver;
seleniumserver=new SeleniumServer();
RemoteControlConfiguration a= seleniumserver.getConfiguration();
File uimap=new File("\\user-extensions.js");
a.setUserExtensions(uimap);
seleniumserver.boot();
seleniumserver.start();
seleneseTestCase = new SeleneseTestCase();
}
___________________________________________________
This is one of the tests
@Test
public void testAddViewMitSelbenNamen() throws Exception {
seleniumClient.open("/E2E_VoiceTM.html?gwt.codesvr=127.0.0.1:9997");
seleniumClient.click("scLocator=//TreeGrid[ID=\"isc_TreeGrid_0\"]/body/row[2]/col[fieldName=nodeTitle||0]");
seleniumClient.click("scLocator=//ToolStripButton[ID=\"isc_ToolStripButton_5\"]/");
}
____________________________________________
And this is the Error i get
[junit] Testcase: testAddViewMitSelbenNamen(de.telekom.vtm.nb.gwt.client_test.AddViewMitSelbenNamenSeleniumTest): Caused an ERROR
[junit] ERROR: Unrecognised locator type: 'sclocator'
[junit] com.thoughtworks.selenium.SeleniumException: ERROR: Unrecognised locator type: 'sclocator'
[junit] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
[junit] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
[junit] at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167)
[junit] at de.telekom.vtm.nb.gwt.client_test.AddViewMitSelbenNamenSeleniumTest.testAddViewMitSelbenNamen(AddViewMitSelbenNamenSeleniumTest.java:13)
[junit] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[junit] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[junit] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
BUILD FAILED
_______________________________
I thought i did everything i needed to make it work, so i can't figure out what the problem is.
Thank you for Support
Now I'm trying to integrate them into the the GTWproject to make automated test after every build with Ant.
This is how i implemented the setup:
@BeforeClass
public static void setUpOnce() throws Exception {
SeleniumServer seleniumserver;
seleniumserver=new SeleniumServer();
RemoteControlConfiguration a= seleniumserver.getConfiguration();
File uimap=new File("\\user-extensions.js");
a.setUserExtensions(uimap);
seleniumserver.boot();
seleniumserver.start();
seleneseTestCase = new SeleneseTestCase();
}
___________________________________________________
This is one of the tests
@Test
public void testAddViewMitSelbenNamen() throws Exception {
seleniumClient.open("/E2E_VoiceTM.html?gwt.codesvr=127.0.0.1:9997");
seleniumClient.click("scLocator=//TreeGrid[ID=\"isc_TreeGrid_0\"]/body/row[2]/col[fieldName=nodeTitle||0]");
seleniumClient.click("scLocator=//ToolStripButton[ID=\"isc_ToolStripButton_5\"]/");
}
____________________________________________
And this is the Error i get
[junit] Testcase: testAddViewMitSelbenNamen(de.telekom.vtm.nb.gwt.client_test.AddViewMitSelbenNamenSeleniumTest): Caused an ERROR
[junit] ERROR: Unrecognised locator type: 'sclocator'
[junit] com.thoughtworks.selenium.SeleniumException: ERROR: Unrecognised locator type: 'sclocator'
[junit] at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
[junit] at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
[junit] at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:167)
[junit] at de.telekom.vtm.nb.gwt.client_test.AddViewMitSelbenNamenSeleniumTest.testAddViewMitSelbenNamen(AddViewMitSelbenNamenSeleniumTest.java:13)
[junit] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[junit] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[junit] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
BUILD FAILED
_______________________________
I thought i did everything i needed to make it work, so i can't figure out what the problem is.
Thank you for Support
Comment