Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

css with regexp Empty css with regexp

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?
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

css with regexp Empty Re: css with regexp

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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum