Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#68 Add safari web driver and start integration testing
- Loading branch information
1 parent
51dad45
commit 06ccd52
Showing
9 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
modules/citrus-selenium/src/test/java/com/consol/citrus/selenium/integration/SeleniumIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2006-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.consol.citrus.selenium.integration; | ||
|
||
import com.consol.citrus.annotations.CitrusXmlTest; | ||
import com.consol.citrus.testng.AbstractTestNGCitrusTest; | ||
import org.testng.annotations.Test; | ||
|
||
/** | ||
* @author Christoph Deppisch | ||
* @since 2.7 | ||
*/ | ||
public class SeleniumIT extends AbstractTestNGCitrusTest { | ||
|
||
@Test | ||
@CitrusXmlTest | ||
public void SeleniumIT() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
.../citrus-selenium/src/test/resources/com/consol/citrus/selenium/integration/SeleniumIT.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<spring:beans xmlns="http://www.citrusframework.org/schema/testcase" | ||
xmlns:spring="http://www.springframework.org/schema/beans" | ||
xmlns:selenium="http://www.citrusframework.org/schema/selenium/testcase" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://www.citrusframework.org/schema/selenium/testcase | ||
http://www.citrusframework.org/schema/selenium/testcase/citrus-selenium-testcase.xsd | ||
http://www.citrusframework.org/schema/testcase | ||
http://www.citrusframework.org/schema/testcase/citrus-testcase.xsd"> | ||
|
||
<testcase name="SeleniumIT"> | ||
<meta-info> | ||
<author>Christoph Deppisch</author> | ||
<creationdate>2017-01-02</creationdate> | ||
<status>FINAL</status> | ||
<last-updated-by>Christoph Deppisch</last-updated-by> | ||
<last-updated-on>2017-01-02T00:00:00</last-updated-on> | ||
</meta-info> | ||
|
||
<description>Test selenium command execution with browser client.</description> | ||
|
||
<actions> | ||
<echo> | ||
<message>Validate Selenium browser commands</message> | ||
</echo> | ||
|
||
<selenium:start browser="webBrowser"/> | ||
|
||
<selenium:navigate page="http://localhost:19090"/> | ||
|
||
<selenium:find> | ||
<selenium:element tag-name="h1"/> | ||
</selenium:find> | ||
|
||
<selenium:click> | ||
<selenium:element id="open-alert"/> | ||
</selenium:click> | ||
|
||
<sleep milliseconds="1000"/> | ||
|
||
<selenium:alert action="accept"/> | ||
|
||
<selenium:click> | ||
<selenium:element link-text="Say Hello!"/> | ||
</selenium:click> | ||
|
||
<sleep milliseconds="500"/> | ||
|
||
<selenium:alert action="accept"/> | ||
|
||
<selenium:stop browser="webBrowser"/> | ||
|
||
</actions> | ||
|
||
</testcase> | ||
</spring:beans> |
8 changes: 8 additions & 0 deletions
8
modules/citrus-selenium/src/test/resources/templates/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<body> | ||
<h1>Welcome!</h1> | ||
|
||
<p><button id="open-alert" onclick="alert('Hello');">Say Hello!</button></p> | ||
<p><a href="#" onclick="alert('Hello');">Say Hello!</a></p> | ||
</body> | ||
</html> |