View buttons.html
<a style="position: absolute; top: 10px; left: 400px;" href="#"><button class=".jiraTrigger">Report an Issue!</button></a>
<a style="position: absolute; top: 10px; left: 270px;" href="http://example.com/documentation"><button>Documentation</button></a>
View custom.css
button {
background: #2196f3;
padding: 5px;
border: none;
color: white;
margin-right: 4px;
}
button:hover {
background-color: #41b6ff;
View jenkins-issue-collector.js
(function(summary, description, component){
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
jQuery(".jiraTrigger").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
},
fieldValues : {
summary : summary,
View issue-collector.js
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
//Requires that jQuery is available!
jQuery("#myCustomTrigger").click(function(e) {
e.preventDefault();
showCollectorDialog();
console.log("klickade p� support-knapp!");
});
}};
View Page.java
public class Page {
private String url;
protected Actions actions;
private RemoteWebDriver browser;
public Page(String url) {
this.url = url;
}
View LogoutTest.java
public class LogoutTest extends SeleniumTestBase {
private StartPage startPage = new StartPage();
private LoggedOutPage loggedOutPage = new LoggedOutPage();
public LogoutTest() {
this.pagesToInitialize = Lists.newArrayList(startPage);
}
@Test
public void shouldEndUpOnLoggedOutPageWhenLoggedOut() {
View StartPage.java
public class StartPage extends Page {
@FindBy(css = "button[data-test=userButton]")
private WebElement userbutton;
@FindBy(css = "a[data-test=logoutButton]")
private WebElement logoutButton;
public StartPage() {
super("http://my-page.se");
View SeleniumTestBase.java
package framework;
import static framework.Constants.BROWSER_CAPABILIITY;
import static framework.Constants.ENABLE_VIDEO;
import static framework.Constants.ENABLE_VNC;
import static framework.Constants.NAME;
import static framework.Constants.THIRTY;
import static java.util.concurrent.TimeUnit.SECONDS;
import java.net.MalformedURLException;
View pom.xml
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.7.1</version>
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"