Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium WebDriver Integration
Today at 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

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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,
Code:
[<]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?
avatar
Archana
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

hi,
To use css in selenium , it is a actual way

css=cssSelectorSyntax
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:
http://www.w3.org/TR/CSS2/selector.html

Hope this will help you, best of luck.

bye
avatar
Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

View previous topic View next topic Back to top


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