Как проверить, что текущий текст в конкретном элементе отображается на странице с помощью Selenium IDE?

0

У меня есть вопрос, который не может решить.

Могут ли все рассказать мне, как найти текущий элемент, показанный ниже?

<td style="width: 250; text-align:right" class="stData"> March 14 2014, 00:00 </td> 

который содержит ровно текст "14 марта 2014, 00:00"?

Теги:
selenium
selenium-ide

2 ответа

0

Используйте verifyText, verifyNotText методы для проверки наличия текста в Selenium IDE.

verifyText (локатор, шаблон)

Arguments:

    locator - an element locator

Returns:
    the text of the element

Gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.

verifyNotText (локатор, шаблон)

Arguments:

    locator - an element locator

Returns:
    the text of the element

Gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
0

Вы можете попробовать мощный java-пакет jsoup. Некоторые гиды here.

Ещё вопросы

Сообщество Overcoder
Наверх
Меню