Verify Text Present on Page

Asked by Artem Ustinov on 2012-01-06

Hi,

Vhat is the preferred analogue in sst for Selenium's Verify Text Present?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
selenium-simple-test Edit question
Assignee:
No assignee Edit question
Solved by:
Corey Goldberg
Solved:
2012-01-10
Last query:
2012-01-10
Last reply:
2012-01-06
Best Corey Goldberg (coreygoldberg) said : #1

you can use `get_element(Text='foo')` to try locating any element by specified text attribute. It will throw an exception if it fails to locate it.

you calso assert text in get_page_source()

hope that helps.

-Corey

Artem Ustinov (ustinov) said : #2

Thanks Corey Goldberg, that solved my question.

Corey Goldberg (coreygoldberg) said : #3

note.. it is:
get_element(text='foo')
(no caps in kwarg)

Michael Foord (mfoord) said : #4

There is also a text_regext filter on get_element, so you can do assert_element(tag='p', text_regex='foo')