Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

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?

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

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

- Similar topics

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