[JBoss JIRA] (ARQGRA-245) Returning a value from Function<T, V> in WebDriverwait cannot be compiled with JDK7
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-245?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-245:
------------------------------
Assignee: 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
11 years, 12 months
[JBoss JIRA] (ARQGRA-245) Returning a value from Function<T, V> in WebDriverwait cannot be compiled with JDK7
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-245?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-245:
------------------------------
Fix Version/s: 2.0.0.Alpha3
> 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
> 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
11 years, 12 months
[JBoss JIRA] (ARQGRA-221) Introduce own implementation of By
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-221?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-221:
------------------------------
Fix Version/s: 2.0-Tracking
> Introduce own implementation of By
> ----------------------------------
>
> Key: ARQGRA-221
> URL: https://issues.jboss.org/browse/ARQGRA-221
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha2
> Reporter: Jan Papousek
> Assignee: Lukáš Fryč
> Fix For: 2.0-Tracking
>
>
> Locators in Graphene 1 contains #format(Object...) method which allows you to reuse in the following way:
> {code}
> JQueryLocator general = jq("div[id$=item{0}] td.rf-ac-itm-ico");
> for (int i=0; i<10; i++) {
> JQueryLocator icon = general.format(1);
> ...
> }
> {code}
> It would be nice to have something similar in Graphene 2 (using By instead of JQueryLocator).
> Other possibly usefel methods:
> - getDescendant()
> - getChild()
--
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
11 years, 12 months
[JBoss JIRA] (ARQGRA-249) Negation in fluent API is not compilable
by Lukáš Fryč (JIRA)
Lukáš Fryč created ARQGRA-249:
---------------------------------
Summary: 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
11 years, 12 months