File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Problems with xpath and selenium
Joined: Jul 24, 2013
Jul 26, 2013 06:15:48
Hello, good morning. I'm using XPath to find an attribute of a field and be able to change this attribute.
For example, I have the last name and this field has the value Dias. I want to put another name.
This command in selenium
selenium.type ("/ / div [() =" datos "* / text] de entrada / descendant :: [@ name = 'nombre'] "," Roberts ");
Exception in thread "main" com.thoughtworks.selenium.SeleniumException: ERROR: Invalid xpath : XPath parse error // Div [* /text () = 'dados'] / descendente :: input [ @ name ='sobrenome']: // Step [ RelativeLocationPath / Expr ] /
Thanks for the help
Joined: Sep 10, 2013
Sep 15, 2013 11:30:54
What is datos? Is that a
variable? If so, then you want to build the string with the + sign like this:
selenium.type ("/ / div [() =" + datos + "* / text] de entrada / descendant :: [@ name = 'nombre'] "," Roberts ");
I agree. Here's the link:
subject: Problems with xpath and selenium
Java XHTML DOM: Exception in getElementById with XPath
Script for an email address that is already registered in the database
java.lang.NoClassDefFoundError: org/dom4j/DocumentException - error encontered
selenium code for ahref
Junit4+Eclipse+Selenium RC- Test class should have exactly one public zero-argument constructor
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015