[arquillian-issues] [JBoss JIRA] (ARQGRA-279) Support for method Graphene.element(WebElement, By) and its condition isPresent
Jan Papousek (JIRA)
jira-events at lists.jboss.org
Tue Apr 30 09:48:53 EDT 2013
[ https://issues.jboss.org/browse/ARQGRA-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762051#comment-12762051 ]
Jan Papousek edited comment on ARQGRA-279 at 4/30/13 9:46 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));
waitAjax().until().element(by).is().present(); // HERE
Element partElement = root.findElement(by);
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 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.
> 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
More information about the arquillian-issues
mailing list