[JBoss JIRA] (ARQGRA-197) Support for Page Objects encapsulating location
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-197?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-197:
------------------------------------
An offline proposed solution:
{code}
@Location("foo/bar.jsf")
public class MyPageObject {
}
@Page @OperatesOnDeployment(Qualifier.class)
MyPageObject foo;
...
MyPageObject obj = Graphene.goTo(foo);
....
@Test @OperatesOnDeployment(Qualified.class)
public void test(@Location MyPageObject obj) {
//it will automatically opens the page
}
{code}
> Support for Page Objects encapsulating location
> -----------------------------------------------
>
> Key: ARQGRA-197
> URL: https://issues.jboss.org/browse/ARQGRA-197
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha2
> Reporter: Lukáš Fryč
> Assignee: Juraj Húska
> Priority: Minor
> Fix For: 2.0.0.Beta1
>
>
> {code:java|title=ConferencePage.java}
> @Location("view/conference/create.jsf")
> public class ConferencePage {
>
> @FindBy(id = "create")
> private ConferenceForm form;
>
> public ConferenceForm getForm() {
> return form;
> }
> }
> public class ConferencePage implements Bookmarkable {
>
> @FindBy(id = "create")
> private ConferenceForm form;
>
> public ConferenceForm getForm() {
> return form;
> }
> public String getLocation() {
> return "view/conference/create.jsf";
> }
> }
> {code}
> {code:java|title=Test.java}
> @Test
> public void test() {
> ConferencePage page = goTo(ConferencePage.class);
> ConferenceForm = page.getForm();
> }
> {code}
> The only issue is that it is not sure on which deployment and with what browser should given Page operate.
--
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, 9 months
[JBoss JIRA] (ARQGRA-280) refactor handling of staleness
by Jan Papousek (JIRA)
Jan Papousek created ARQGRA-280:
-----------------------------------
Summary: refactor handling of staleness
Key: ARQGRA-280
URL: https://issues.jboss.org/browse/ARQGRA-280
Project: Arquillian Graphene
Issue Type: Task
Affects Versions: 2.0.0.Alpha3
Reporter: Jan Papousek
The current situation of handling staleness is it works purely accidentally in some cases and it prevents any caching of web elements.
Imagine the following code:
{code}
Action action = new Actions(driver).moveToElement(element).build();
... // some action causing staleness
action.perform();
{code}
The previous code doesn't throw StaleElementReferenceException only in the case when the action causing staleness finishes before the requested action starts performing and when there is no caching of web elements. Currently Graphene can't force the action to perform again when StaleElementReferenceException is thrown.
In the case of caching the scenerio would be:
# element is loaded and put to the cache
# ... some actions ...
# action causing staleness is performed
# the requested action starts performing
-- cached element is used => StaleElementReferenceException
--
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, 9 months
[JBoss JIRA] (ARQGRA-273) Intercept WebDriver to return proxies in findElement()/findElements() methods
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-273?page=com.atlassian.jira.plugin... ]
Jan Papousek resolved ARQGRA-273.
---------------------------------
Resolution: Done
> Intercept WebDriver to return proxies in findElement()/findElements() methods
> -----------------------------------------------------------------------------
>
> Key: ARQGRA-273
> URL: https://issues.jboss.org/browse/ARQGRA-273
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Fix For: 2.0.0.Beta1
>
>
> Make elements returned by SearchContext#findElement()/SearchContext#findElements() methods protected to staleness.
> -Graphene injects web element instances to page objects and page fragments which can handle stale element exception. Sometimes one needs to find element manually via WebDriver#findElement(...). It would be nice to provide a method in Graphene API for finding elements returning instances protected to stale element exceptions.-
--
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, 9 months
[JBoss JIRA] (ARQGRA-279) Support for method Graphene.element(WebElement, By) and its condition isPresent
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-279?page=com.atlassian.jira.plugin... ]
Jan Papousek edited comment on ARQGRA-279 at 3/20/13 7:24 AM:
--------------------------------------------------------------
Thank you for the feature request! However I think it will be resolved by ARQGRA-273, then you will be able to write:
{code}
...
public void openFile(String path) {
String[] parts = path.split("/");
for (String part: parts) {
By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
Element partElement = root.findElement(by);
waitAjax().until().element(partElement).is().present(); // HERE
partElement.click();
}
}
...
{code}
Unfortunately it isn't possible before resolving ARQGRA-273, because the element returned by 'root.findElement(by)' is not proxy and the condition doesn't work for non-proxy elements.
was (Author: jpapouse):
Thank you for the feature request! However I think it will be resolved by ARQGRA-273, then you will be able to write:
{code}
public class ProjectExplorer {
...
@Root
private WebElement root;
@FindBy(css = "table>tr:first-child() div");
private WebElement path;
...
public void openFile(String path) {
String[] parts = path.split("/");
for (String part: parts) {
By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
Element partElement = root.findElement(by);
waitAjax().until().element(partElement).is().present(); // HERE
partElement.click();
}
}
public String getPath () {
return path.getText();
}
}
{code}
Unfortunately it isn't possible before resolving ARQGRA-273, because the element returned by 'root.findElement(by)' is not proxy and the condition doesn't work for non-proxy elements.
> Support for method Graphene.element(WebElement, By) and its condition isPresent
> -------------------------------------------------------------------------------
>
> Key: ARQGRA-279
> URL: https://issues.jboss.org/browse/ARQGRA-279
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Components: api
> Reporter: Sona Jamborova
>
> Please, can you add support for method Graphene.element(WebElement, By) for searching element (located by By) in parent element.
> Motivation:
> A panel which display content of current directory. Operations with this panel are open a file, open a child directory, go back. The content of this panel depends on file system and we use different file system for our test. I need create general framework for our tests. I think about:
> {code}
> public class Designer {
> ...
> @FindBy(jquery = "div.tabbable:contains('Project Explorer')")
> private ProjectExplorer projExpl;
> ...
> }
> {code}
> {code}
> public class ProjectExplorer {
> ...
> @Root
> private WebElement root;
>
> @FindBy(css = "table>tr:first-child() div");
> private WebElement path;
> ...
>
> public void openFile(String path) {
> String[] parts = path.split("/");
> for (String part: parts) {
> By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
> waitAjax().until(element(root, by).isPresent());
> root.findElement(by).click(); //this should be reduce to waitAjax().until(element(root, by).isPresent()).click(); (this is not point of this issue)
> }
> }
> public String getPath () {
> return path.getText();
> }
> }
> {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, 9 months
[JBoss JIRA] (ARQGRA-279) Support for method Graphene.element(WebElement, By) and its condition isPresent
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-279?page=com.atlassian.jira.plugin... ]
Jan Papousek commented on ARQGRA-279:
-------------------------------------
Thank you for the feature request! However I think it will be resolved by ARQGRA-273, then you will be able to write:
{code}
public class ProjectExplorer {
...
@Root
private WebElement root;
@FindBy(css = "table>tr:first-child() div");
private WebElement path;
...
public void openFile(String path) {
String[] parts = path.split("/");
for (String part: parts) {
By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
Element partElement = root.findElement(by);
waitAjax().until().element(partElement).is().present(); // HERE
partElement.click();
}
}
public String getPath () {
return path.getText();
}
}
{code}
Unfortunately it isn't possible before resolving ARQGRA-273, because the element returned by 'root.findElement(by)' is not proxy and the condition doesn't work for non-proxy elements.
> Support for method Graphene.element(WebElement, By) and its condition isPresent
> -------------------------------------------------------------------------------
>
> Key: ARQGRA-279
> URL: https://issues.jboss.org/browse/ARQGRA-279
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Components: api
> Reporter: Sona Jamborova
>
> Please, can you add support for method Graphene.element(WebElement, By) for searching element (located by By) in parent element.
> Motivation:
> A panel which display content of current directory. Operations with this panel are open a file, open a child directory, go back. The content of this panel depends on file system and we use different file system for our test. I need create general framework for our tests. I think about:
> {code}
> public class Designer {
> ...
> @FindBy(jquery = "div.tabbable:contains('Project Explorer')")
> private ProjectExplorer projExpl;
> ...
> }
> {code}
> {code}
> public class ProjectExplorer {
> ...
> @Root
> private WebElement root;
>
> @FindBy(css = "table>tr:first-child() div");
> private WebElement path;
> ...
>
> public void openFile(String path) {
> String[] parts = path.split("/");
> for (String part: parts) {
> By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
> waitAjax().until(element(root, by).isPresent());
> root.findElement(by).click(); //this should be reduce to waitAjax().until(element(root, by).isPresent()).click(); (this is not point of this issue)
> }
> }
> public String getPath () {
> return path.getText();
> }
> }
> {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, 9 months
[JBoss JIRA] (ARQGRA-279) Support for method Graphene.element(WebElement, By) and its condition isPresent
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-279?page=com.atlassian.jira.plugin... ]
Jan Papousek updated ARQGRA-279:
--------------------------------
Description:
Please, can you add support for method Graphene.element(WebElement, By) for searching element (located by By) in parent element.
Motivation:
A panel which display content of current directory. Operations with this panel are open a file, open a child directory, go back. The content of this panel depends on file system and we use different file system for our test. I need create general framework for our tests. I think about:
{code}
public class Designer {
...
@FindBy(jquery = "div.tabbable:contains('Project Explorer')")
private ProjectExplorer projExpl;
...
}
{code}
{code}
public class ProjectExplorer {
...
@Root
private WebElement root;
@FindBy(css = "table>tr:first-child() div");
private WebElement path;
...
public void openFile(String path) {
String[] parts = path.split("/");
for (String part: parts) {
By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
waitAjax().until(element(root, by).isPresent());
root.findElement(by).click(); //this should be reduce to waitAjax().until(element(root, by).isPresent()).click(); (this is not point of this issue)
}
}
public String getPath () {
return path.getText();
}
}
{code}
was:
Please, can you add support for method Graphene.element(WebElement, By) for searching element (located by By) in parent element.
Motivation:
A panel which display content of current directory. Operations with this panel are open a file, open a child directory, go back. The content of this panel depends on file system and we use different file system for our test. I need create general framework for our tests. I think about:
public class Designer {
...
@FindBy(jquery = "div.tabbable:contains('Project Explorer')")
private ProjectExplorer projExpl;
...
}
public class ProjectExplorer {
...
@Root
private WebElement root;
@FindBy(css = "table>tr:first-child() div");
private WebElement path;
...
public void openFile(String path) {
String[] parts = path.split("/");
for (String part: parts) {
By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
waitAjax().until(element(root, by).isPresent());
root.findElement(by).click(); //this should be reduce to waitAjax().until(element(root, by).isPresent()).click(); (this is not point of this issue)
}
}
public String getPath () {
return path.getText();
}
}
> Support for method Graphene.element(WebElement, By) and its condition isPresent
> -------------------------------------------------------------------------------
>
> Key: ARQGRA-279
> URL: https://issues.jboss.org/browse/ARQGRA-279
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Components: api
> Reporter: Sona Jamborova
>
> Please, can you add support for method Graphene.element(WebElement, By) for searching element (located by By) in parent element.
> Motivation:
> A panel which display content of current directory. Operations with this panel are open a file, open a child directory, go back. The content of this panel depends on file system and we use different file system for our test. I need create general framework for our tests. I think about:
> {code}
> public class Designer {
> ...
> @FindBy(jquery = "div.tabbable:contains('Project Explorer')")
> private ProjectExplorer projExpl;
> ...
> }
> {code}
> {code}
> public class ProjectExplorer {
> ...
> @Root
> private WebElement root;
>
> @FindBy(css = "table>tr:first-child() div");
> private WebElement path;
> ...
>
> public void openFile(String path) {
> String[] parts = path.split("/");
> for (String part: parts) {
> By by = jquerySelector(format("a.gwt-Anchor:contains('%s')", part));
> waitAjax().until(element(root, by).isPresent());
> root.findElement(by).click(); //this should be reduce to waitAjax().until(element(root, by).isPresent()).click(); (this is not point of this issue)
> }
> }
> public String getPath () {
> return path.getText();
> }
> }
> {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, 9 months