Wednesday, February 26, 2014

Regular Expression in Selenium and Scroll the browser using Selenium IDE

Using Regexp in Selenium:

              The syntax part is given in Target.

                Syntax:
                                label=regexp:.*P.*am.*
                                link=regexp:.*P.*am.*
                Example:
                                <tr>
<td>verifyTextPresent</td>
                                                <td>link=regexp:.*H</td>
                                                <td></td>
                                </tr>

                 By click the find button means it will highlight the link where its present.

To scroll the browser in Selenium IDE as,

Command : storeEval
Target : selenium.browserbot.getCurrentWindow().scrollBy(0,2200)
 here, the scroll content is specified as 2200 px in vertical

No comments: