Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xpath result contains only one html node #661

Open
GoogleCodeExporter opened this issue May 13, 2015 · 1 comment
Open

xpath result contains only one html node #661

GoogleCodeExporter opened this issue May 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
html:
<html>
    <body>
        <div>1</div>
        <div>2</div>
    </body>
</html>

java:
ArrayList<WebElement> webElements = soloAddon.getWebElements( By.xpath( "//div" 
) );
System.out.println( "webElements count=" + webElements.size() );

What is the expected output? What do you see instead?
Expected:
webElements count=2

Actual:
webElements count=1

What version of the product are you using? On what operating system?
Robotium Solo 5.3.1
Android 4.4 Kit Kat

Actually bug was found in RobotiumWeb.js in javascript function xpath. In while 
cycle when you iterate to next element you use wrong variable name "result". 
You should use variable "elements" to call iterateNext().


Original issue reported on code.google.com by dmitry.t...@gmail.com on 20 Feb 2015 at 11:36

@GoogleCodeExporter
Copy link
Author

Thanks for reporting this. 

Original comment by renasr...@gmail.com on 24 Feb 2015 at 12:29

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant