0

我想存储"The id you entered does not exist in our database. Please note, ids are case and space sensitive."在一个变量中。

<p class="message fail"> The id you entered does not exist in our database. Please note, ids are case and space sensitive. </p>
4

1 回答 1

2

尝试:

your_variable = driver.find_element(:class, 'message fail').text

.text方法将为您提供元素的文本。

于 2012-09-25T14:11:20.720 回答