[JBoss JIRA] (ARQ-1251) Arquillian Drone is unable to instantiate Firefox driver if acceptSslCerts, webStorageEnabled, loggingPrefs properties are used in arquillian.xml
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1251?page=com.atlassian.jira.plugin.s... ]
Karel Piwko updated ARQ-1251:
-----------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/arquillian/arquillian-extension-drone/pull/20
> Arquillian Drone is unable to instantiate Firefox driver if acceptSslCerts, webStorageEnabled, loggingPrefs properties are used in arquillian.xml
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1251
> URL: https://issues.jboss.org/browse/ARQ-1251
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Drone
> Reporter: Tomas Repel
> Assignee: Karel Piwko
>
> Description of problem:
> If you set these properties via arquillian.xml, the Drone fails to instantiate the Firefox driver. The problem is during creation of org.openqa.selenium.firefox.FirefoxDriver instance, these properties are cast from String to e.g. Boolean (in case of acceptSslCerts) resulting in ClassCastException.
> Snippet of arquillian.xml:
> {code:xml}
> <extension qualifier="webdriver">
> <property name="acceptSslCerts">false</property>
> <property name="webStorageEnabled">false</property>
> <property name="loggingPrefs">someLoggingPrefs</property>
> </extension>
> {code}
> Snippet of Firefox driver injection that fails:
> {code}
> @Drone
> FirefoxDriver browser;
> {code}
> Version-Release number of selected component (if applicable):
> Arquillian 1.0.3.Final
> Arquillian Drone extension 1.1.0.Final
> Selenium 2.27.0 (WebDriver 2)
> How reproducible:
> Always.
> Steps to Reproduce:
> 1. launch functional test using code snippets above
>
> Actual results:
> {noformat}
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
> at org.openqa.selenium.firefox.FirefoxDriver.populateProfile(FirefoxDriver.java:148)
> at org.openqa.selenium.firefox.FirefoxDriver.extractProfile(FirefoxDriver.java:133)
> at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:100)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at org.jboss.arquillian.drone.webdriver.factory.SecurityActions.newInstance(SecurityActions.java:142)
> ... 50 more
> {noformat}
> Expected results:
> It launches Firefox browser.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (ARQGRA-245) Returning a value from Function<T, V> in WebDriverwait cannot be compiled with JDK7
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-245?page=com.atlassian.jira.plugin... ]
Jan Papousek resolved ARQGRA-245.
---------------------------------
Resolution: Out of Date
I've successfuly reproduced the issue with the version from 2012-12-18 (https://github.com/arquillian/arquillian-graphene/commit/cba17c3182e730d7...), but I can't reproduce it with the last snapshot (jdk 1.7.0_07-b10 and 1.7.0_10-b18).
> Returning a value from Function<T,V> in WebDriverwait cannot be compiled with JDK7
> ----------------------------------------------------------------------------------
>
> Key: ARQGRA-245
> URL: https://issues.jboss.org/browse/ARQGRA-245
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0.Alpha2
> Reporter: Karel Piwko
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha3
>
> Attachments: WebElementUntilFunction.java
>
>
> When compiling with JDK7, following error happens:
> {code}
> @FindBy(className = "failed")
> WebElement failedCasesCount;
> @FindBy(className = "passed")
> WebElement passedCasesCount;
> @FindBy(className = "total")
> WebElement totalCasesCount;
> @FindBy(id = "qunit-tests")
> QUnitResultsFragment results;
> private URL pageUrl;
> private long timeout = 60;
> private TimeUnit unit = TimeUnit.SECONDS;
> private int getExecutionResult(WebElement element) {
> if (waitModel().withTimeout(timeout, unit).until(element(element).isPresent())) {
> return Integer.valueOf(element.getText());
> }
> throw new QUnitExecutionException(MessageFormat.format(
> "Unable to execute QUnit tests at {0} within {1}{2}, timeouted.",
> pageUrl, timeout, unit));
> }
> {code}
> {code}
> [WARNING] /home/kpiwko/devel/wfk/wfk-qa/build/drone-qunit-integration/src/main/java/org/jboss/arquillian/drone/qunit/QUnitPage.java:[80,65] [unchecked] unchecked call to <V>until(Function<? super T,V>) as a member of the raw type FluentWait
> [INFO] 1 warning
> [INFO] -------------------------------------------------------------
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR]
> V extends Object declared in method <V>until(Function<? super T,V>)
> T extends Object declared in class FluentWait
> /home/kpiwko/devel/wfk/wfk-qa/build/drone-qunit-integration/src/main/java/org/jboss/arquillian/drone/qunit/QUnitPage.java:[80,65] error: incompatible types
> {code}
> Further investigation shows that:
> until() methods comes from Graphene
> withTimeout() comes from WebDriver
> withMessage() comes form WebDriver
> until(String) comes from Graphene and seems to be leftover from Graphene1 migration.
> The problematic part is about setting FLUENT generics to null as this cause ambiguity on JDK7.
> I'd prefer to decouple direct WebDriverWait of Graphene from WebDriverWait of WebDriver and rather use a delegate.
> That way we can create until(long,TimeUnit) or even withMessage(String), withTimeout(long,TimeUnit) methods which will be able to interfere types even on jdk7.
> Marking this issues a critical. There is no workaround how to set dynamically set wait while using Graphene on JDK7.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (ARQGRA-245) Returning a value from Function<T, V> in WebDriverwait cannot be compiled with JDK7
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-245?page=com.atlassian.jira.plugin... ]
Work on ARQGRA-245 started by Jan Papousek.
> Returning a value from Function<T,V> in WebDriverwait cannot be compiled with JDK7
> ----------------------------------------------------------------------------------
>
> Key: ARQGRA-245
> URL: https://issues.jboss.org/browse/ARQGRA-245
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0.Alpha2
> Reporter: Karel Piwko
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha3
>
> Attachments: WebElementUntilFunction.java
>
>
> When compiling with JDK7, following error happens:
> {code}
> @FindBy(className = "failed")
> WebElement failedCasesCount;
> @FindBy(className = "passed")
> WebElement passedCasesCount;
> @FindBy(className = "total")
> WebElement totalCasesCount;
> @FindBy(id = "qunit-tests")
> QUnitResultsFragment results;
> private URL pageUrl;
> private long timeout = 60;
> private TimeUnit unit = TimeUnit.SECONDS;
> private int getExecutionResult(WebElement element) {
> if (waitModel().withTimeout(timeout, unit).until(element(element).isPresent())) {
> return Integer.valueOf(element.getText());
> }
> throw new QUnitExecutionException(MessageFormat.format(
> "Unable to execute QUnit tests at {0} within {1}{2}, timeouted.",
> pageUrl, timeout, unit));
> }
> {code}
> {code}
> [WARNING] /home/kpiwko/devel/wfk/wfk-qa/build/drone-qunit-integration/src/main/java/org/jboss/arquillian/drone/qunit/QUnitPage.java:[80,65] [unchecked] unchecked call to <V>until(Function<? super T,V>) as a member of the raw type FluentWait
> [INFO] 1 warning
> [INFO] -------------------------------------------------------------
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR]
> V extends Object declared in method <V>until(Function<? super T,V>)
> T extends Object declared in class FluentWait
> /home/kpiwko/devel/wfk/wfk-qa/build/drone-qunit-integration/src/main/java/org/jboss/arquillian/drone/qunit/QUnitPage.java:[80,65] error: incompatible types
> {code}
> Further investigation shows that:
> until() methods comes from Graphene
> withTimeout() comes from WebDriver
> withMessage() comes form WebDriver
> until(String) comes from Graphene and seems to be leftover from Graphene1 migration.
> The problematic part is about setting FLUENT generics to null as this cause ambiguity on JDK7.
> I'd prefer to decouple direct WebDriverWait of Graphene from WebDriverWait of WebDriver and rather use a delegate.
> That way we can create until(long,TimeUnit) or even withMessage(String), withTimeout(long,TimeUnit) methods which will be able to interfere types even on jdk7.
> Marking this issues a critical. There is no workaround how to set dynamically set wait while using Graphene on JDK7.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (ARQGRA-249) Negation in fluent API is not compilable
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-249?page=com.atlassian.jira.plugin... ]
Jan Papousek resolved ARQGRA-249.
---------------------------------
Resolution: Done
There is a strange behaviour in resolving types in Java, so I've replaced
{code}
public static WebDriverWait wait...(...) {
...
}
{code}
by
{code}
public static WebDriverWait<Void> wait...(...) {
...
}
{code}
> Negation in fluent API is not compilable
> ----------------------------------------
>
> Key: ARQGRA-249
> URL: https://issues.jboss.org/browse/ARQGRA-249
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Lukáš Fryč
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha3
>
>
> This code is compilable:
> {code:java}
> waitGui().until().element(suggestionList).is().visible();
> {code}
> But following isn't:
> {code:java}
> waitGui().until().element(suggestionList).is().not().visible();
> {code}
> {code}
> java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months