开发者

Traverse to get to innerHTML

Using Selenium IDE, I need to verify the text "Schedule Entry Worksheet for ZBW - Boston Center" is present. I'd like to use AssertTextPresent to do this. I'm using Firebug to identify the path to the element.

Here's what I've done so far in IDE: Command: assertTextPresent Target: xpath=//html/body/div[7]/div[2]/div/div/span Value: Schedule Entry Worksheet for ZBW - Boston Center

However, I'm getting "[error] false" in the log section. Does anyone know what I'm doing incorrectly?

开发者_StackOverflow中文版

Below is a snippet HTML for the page:

<div id="worksheet_div" style="display: inline;">
    <div class="fg1" style="width: 2010px;">
        <div class="fgt">
            <span style="padding-right: 10px; background-color: #E3EFFF;">Schedule    Entry Worksheet for ZBW - Boston Center</span>
            </div>


does it matter where the text is or just that it is somewhere? if it is the latter you could do something as simple as

css=span

if position on the page matter then need to add more structure to it

css=.fgt span

or similar.

it is also useful to use the firefinder plugin for firefox to debug xpath and css

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜