Hi all,
I have a pretty specialized problem/question I think. Let me start by saying that I'm dealing with a bunch of new stuff and trying to learn as I go. I just heard of XPATH the other day, and I'm using it in a pretty restricted context (more about that later).
First the problem:
I'm writing a Perl script to drive the SeleniumRC QA web testing tool. The API supports the use of XPATH statements to parse web pages. The script I am writing is to direct Selenium to do a bunch of stuff in our web app. Specifically, I get to a page that has 3 frames and a table in the main frame. This table has 6 columns. I can never be sure of how many rows will be in the table. Each row contains info for a specific thing, and I have created one of these things earlier in my script:
col1 col2 ... col6
Column six in each row contains a drop down menu.
I am trying to use XPATH to locate the row, based some text in col2 (I've used a name there that I know is unique to my data), THEN specify, or point at the drop down in col6 for that row.
The reason is that I have to do this in the context of executing a 'select' method in the Selenium API for the drop down. So I'm forced to have to do something like:
$myobject->select("XPATH to drop down here", "Value for selection is here");
The drop downs have dynamically generated names in the HTML, so I can't locate based on that column.
So the problem is that I have to try to locate the row I want, based on some text in a column, then actually point at (or return, I'm not sure of the parlance here) the drop-down that I'm trying to select in col6, in a single XPATH.
I guess the question is...can this even be done, or am I overloading my expectation of the XPATH capability?
If any of you understand this and can offer any help, even if it's to say, "no that can't be done that way"...I'd appreciate it! =:-)
Thanks,
bigtiny