Display results as :

Rechercher Advanced Search

Latest topics
» Run automated selenium test scripts from JIRA ondemand
Fri Dec 08, 2017 12:40 pm by azharuddin

» New! Appium Desktop
Sat Nov 25, 2017 3:51 pm by azharuddin

» Selenium WebDriver Integration
Tue Nov 21, 2017 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir


XPATH and target/value help

View previous topic View next topic Go down

XPATH and target/value help

Post by Gibbsy1985 on Mon Jul 02, 2012 11:20 pm

Hi all,

I have a drop down list, that contains values, on the end of each value is a count, which changes constantly. I'm trying to select a value in the dropdown, but match on say the first 5 characters (so that I can get around the value changing). Can this be done? I've attached a snippet of the source code below

<div class="formRowFullWidthDiv">
<select id="QualificationId" class="textBoxMinLarge input-validation-error" name="QualificationId" data-val-required="The QualificationId field is required." data-val-range-min="1" data-val-range-max="2147483647" data-val-range="Qualification must be selected" data-val-number="The field QualificationId must be a number." data-val="true">
<option value="0" selected="selected">Please Select...</option>
<option value="625">Complete ECDL Essentials and Extra Learning and Testing Solution for Schools (0)</option>
<option value="620">Complete ECDL Learning and Testing Solution (0)</option>
<option value="619">Complete ECDL Essentials Learning and Testing Solution (6)</option>

If I wanted to select option 619 based on the name, but only a portion of it, i.e. "Complete ECDL Essentials Learning and Testing"
how could this be done....

In IDE i have "SELECT" in my command column, "QualificationId" in my target column, and am struggling on the VALUE column..

could someone help?

Many thanks in advance,


Posts : 1
Join date : 2012-07-02

Back to top Go down

Re: XPATH and target/value help

Post by rohit13 on Tue Jul 03, 2012 12:40 pm

With the help of regular expression you can write your code.
Below is for option 619
select  |  id=QualificationId  | label=regexp:.*Complete ECDL Essentials Learning and Testing Solution.*

Radical QA

Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum