Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions pom.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>xebium</artifactId>
<groupId>com.xebia.incubator</groupId>
<version>0.13-SNAPSHOT</version>
<version>0.15-SNAPSHOT-mqm</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be in the PR

<name>Xebium</name>
<packaging>jar</packaging>

Expand All @@ -29,20 +29,21 @@
</licenses>

<properties>
<selenium.version>2.42.0</selenium.version>
<fitnesse.version>20130530</fitnesse.version>
<selenium.version>2.45.0</selenium.version>
<fitnesse.version>20150424</fitnesse.version>
<fitnesse.port>8000</fitnesse.port>
<fitnesse.expiration>0</fitnesse.expiration>
<orgjson.version>20140107</orgjson.version>
<maven-classpath-plugin.version>1.7</maven-classpath-plugin.version>
<slf4j.version>1.6.4</slf4j.version>
<slf4j.version>1.6.6</slf4j.version>
<operadriver.version>1.1</operadriver.version>
<phantomjsdriver.version>1.0.3</phantomjsdriver.version>
<phantomjsdriver.version>1.2.1</phantomjsdriver.version>
<commons-lang.version>2.6</commons-lang.version>
</properties>

<scm>
<connection>scm:git:git://github.com/xebia/Xebium.git</connection>
<developerConnection>scm:git:[email protected]:xebia/Xebium.git</developerConnection>
<connection>scm:git:git://github.com/sglebs/Xebium.git</connection>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

<developerConnection>scm:git:[email protected]:sglebs/Xebium.git</developerConnection>
<url>scm:git:http://github.com/xebia/Xebium</url>
</scm>

Expand Down Expand Up @@ -78,7 +79,7 @@
<version>${operadriver.version}</version>
</dependency>
<dependency>
<groupId>com.github.detro.ghostdriver</groupId>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>${phantomjsdriver.version}</version>
</dependency>
Expand All @@ -87,6 +88,11 @@
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${orgjson.version}</version>
</dependency>
<!-- for some reason FitNesse appears to conflict with guava 15 from selenium -->
<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -131,7 +137,7 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<version>1.3</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -274,7 +280,7 @@
<profile>
<id>fitnesse-integration</id>
<activation>
<activeByDefault>true</activeByDefault>
<activeByDefault>false</activeByDefault>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

When I try to upgrade FitNesse, I get an error:

     [java] **********************************************************
     [java] Executing command: ProjectXebium?suite&format=text&excludeSuiteFilter=NotOnPhantomJS
     [java] -----Command Output-----
     [java] Exception in thread "main" java.lang.AbstractMethodError
     [java]     at fitnesse.wikitext.parser.ParseSpecification.parse(ParseSpecification.java:96)
     [java]     at fitnesse.wikitext.parser.Parser.parse(Parser.java:141)
     [java]     at fitnesse.wikitext.parser.Parser.parse(Parser.java:137)

We should fix that error instead of disabling the tests :)

</activation>
<build>
<plugins>
Expand Down Expand Up @@ -325,7 +331,7 @@
<name>Xebia B.V.</name>
<url>http://xebia.com</url>
</organization>

<developers>
<developer>
<id>sgrijpink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ public void setBrowser(String browser) {
this.browser = browser;
}

public String getBrowser() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tabs for indentations (though I realize we're being inconsistent about that, #147)

return this.browser;
}

public void setCustomProfilePreferencesFile(
File customProfilePreferencesFile) {
this.customProfilePreferencesFile = customProfilePreferencesFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ public Capabilities getCapabilities() {
* @throws RuntimeException in case of any error
*/
public WebDriver get() {
return new Augmenter().augment(new RemoteWebDriver(getRemote(), getCapabilities()));
RemoteWebDriver remoteWebDriver = new RemoteWebDriver(getRemote(), getCapabilities()) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spurious spaces

remoteWebDriver.setFileDetector(new org.openqa.selenium.remote.LocalFileDetector()); // https://saucelabs.com/resources/selenium-file-upload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks neat, can we add a test for this?

return new Augmenter().augment(remoteWebDriver);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

import static com.xebia.incubator.xebium.FitNesseUtil.*;
import static org.apache.commons.lang.StringUtils.join;

import org.openqa.selenium.Keys;
/**
* Main fixture. Starts a browser session and execute commands.
*/
Expand Down Expand Up @@ -81,8 +81,16 @@ public class SeleniumDriverFixture {

public SeleniumDriverFixture() {
super();
initSpecialKeysMapping();
}

private void initSpecialKeysMapping() {
aliases.put("$KEY_BACKSPACE", Keys.chord(Keys.BACK_SPACE));
aliases.put("$KEY_TAB", Keys.chord(Keys.TAB));
aliases.put("$KEY_ENTER", Keys.chord(Keys.ENTER));
aliases.put("$KEY_RETURN", Keys.chord(Keys.RETURN));
}

private WebDriver defaultWebDriverInstance() {
return defaultWebDriverSupplier.newWebDriver();
}
Expand Down Expand Up @@ -251,7 +259,10 @@ private void setTimeoutOnSelenium() {
executeCommand("setTimeout", new String[] { "" + this.timeout });
WebDriver.Timeouts timeouts = getWebDriver().manage().timeouts();
timeouts.setScriptTimeout(this.timeout, TimeUnit.MILLISECONDS);
timeouts.pageLoadTimeout(this.timeout, TimeUnit.MILLISECONDS);
if (defaultWebDriverSupplier.getBrowser() != null && // mqm fix for use with the hsac bridge
defaultWebDriverSupplier.getBrowser().toLowerCase().equals("safari")) //mqm fix for #137 - safari does not support this API
return;
timeouts.pageLoadTimeout(this.timeout, TimeUnit.MILLISECONDS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ protected Void handleSeleneseCommand(WebDriver driver, String locator, String va
if (value == null) {
value = "";
}
value = value.replace("\\08", Keys.BACK_SPACE); // sglebs fix
value = value.replace("\\09", Keys.TAB); // sglebs fix
value = value.replace("\\10", Keys.ENTER);
value = value.replace("\\13", Keys.RETURN);
value = value.replace("\\27", Keys.ESCAPE);
Expand Down