Display results as :

Rechercher Advanced Search

Latest topics
» why do i get this error
Yesterday at 9:43 pm by anbarasi

» wait property
Yesterday at 12:50 pm by anbarasi

» What is the use of Selenium Remote Control
Fri Apr 21, 2017 7:24 pm by azharuddin

» How can I fix it? TCP PORT Exhaustion
Wed Apr 19, 2017 3:29 pm by JohnSnow

» Difference between QTP, Selenium and Silk test
Wed Apr 19, 2017 2:30 pm by Basilios Will

» Locator for google document
Tue Apr 18, 2017 10:01 pm by SergeyK

» I encountered a mistake: Couldn't register this node
Sat Apr 15, 2017 9:06 pm by skyshine725

» Current version tutorial for just creating a browser instance - Visual Studio
Fri Apr 14, 2017 2:47 am by KilpAr

» cant able to select drop down otions
Thu Apr 13, 2017 6:08 pm by anbarasi


css with regexp

View previous topic View next topic Go down

css with regexp

Post by Archana on Mon Aug 24, 2009 7:38 pm

I want to know the presence of a span tag element.

For Example,
[<]span class="cpCurrentMonthDateDisabled"[>]23[<]/span[>]

(Pls, ignore square brackets in above stmt Embarassed )

But I don't know exact class(css) name, I know just few letters of class name, let's say Disable, How to exec assertElementPresent command?

The below is not working

assertElementPresent | //span[@class='regexp:*Disable*'] | 23.

How to do?
Regular Participant
Regular Participant

Posts : 33
Join date : 2009-08-21

Back to top Go down

Re: css with regexp

Post by Adviser on Tue Aug 25, 2009 11:10 am

To use css in selenium , it is a actual way

Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors
for more information. You can also check the TestCssLocators test in
the selenium test suite for an example of usage, which is included in
the downloaded selenium core package.

  • css=a[href="#id3"]
  • css=span#firstChild + span

Currently the css selector locator supports all css1, css2 and css3
selectors except namespace in css3, some pseudo classes(:nth-of-type,
:nth-last-of-type, :first-of-type, :last-of-type, :only-of-type,
:visited, :hover, :active, :focus, :indeterminate) and pseudo
elements(::first-line, ::first-letter, ::selection, ::before, ::after).

For more details, read this link:

Hope this will help you, best of luck.


Posts : 379
Join date : 2009-07-30
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