Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

catch plain text with IDE? How To

View previous topic View next topic Go down

catch plain text with IDE? How To

Post by dainova on Thu Nov 08, 2012 7:16 am

Hi, all
I'm trying to identify how I can with Se/IDE to identify and store in my script that value: <77705746> (from Member #77705746). it's inside H1 tugs.
Looks like it's just a plain test, I tried to play with all Firebug but nothing works, says ELement not found. I'm thinking maybe storeHTMLSource and then try to find this string by keyword (contains )? Or somebody can offer something else, will appreciate your help.
this is just excerpt from html source with elements before and after line in question:

Code:

<table cellspacing="0" cellpadding="4" border="0" width="100%" style="background: #e6eefa; border-top: 2px darkblue solid; margin-top: 4px;">
<tbody>
</table>
<br>
<h1>
<script type="text/javascript" language="JavaScript">
<table id="ctl00_cntPageTitle_ctrlSearch_pnlSearch" cellspacing="0" cellpadding="0" border="0" width="100%">
BILL CLINTON 
<span style="font-size:16px;color:#333333;">
<b>Member #77705746</b>
</span>
</h1>
<br>
<table id="ctl00_cntMainContent_pnlCommon" cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
</table>

dainova
Active particpant
Active particpant

Posts : 19
Join date : 2012-02-23

Back to top Go down

Re: catch plain text with IDE? How To

Post by tarun3kumar on Thu Nov 08, 2012 12:23 pm

Is storeEval what you are looking for ?

Code:
storeEval(script, variableName)
Generated from getEval(script)
    Arguments:

        script - the JavaScript snippet to run

    Returns:
        the results of evaluating the snippet

    Gets the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.

    Note that, by default, the snippet will run in the context of the "selenium" object itself, so this will refer to the Selenium object. Use window to refer to the window of your application, e.g. window.document.getElementById('foo')

    If you need to use a locator to refer to a single element in your application page, you can use this.browserbot.findElement("id=foo") where "id=foo" is your locator.

_________________
Thanks
Tarun K
Free Selenium Training

tarun3kumar
Master
Master

Posts : 186
Join date : 2012-02-14

http://seleniumtests.com

Back to top Go down

Re: catch plain text with IDE? How To

Post by dainova on Fri Nov 09, 2012 12:48 am

Tx, Tarun
But I still tied to Se/IDE/Selenese. I don't have a choice for now. I think your solution in j.

Best
Dai

dainova
Active particpant
Active particpant

Posts : 19
Join date : 2012-02-23

Back to top Go down

Re: catch plain text with IDE? How To

Post by Sponsored content Today at 1:06 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum