简体   繁体   中英

Imacros replace text element?

I have a HTML like this :

<div data-dojo-attach-point="wrapper" id="c-container-wrapper" class="test"><div><h1>7</h1><div style="background:....

Because it's a countdown time so i want to use imacros to change more time at :

...<h1>7</h1>...

I want to add more time. ex : <h1>70</h1>....

This is my code :

VERSION BUILD=8530828 RECORDER=FX
TAB T=1
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 1000
TAG POS=1 TYPE=H1 ATTR=TXT:15 EXTRACT=TXT CONTENT=EVAL("var s=\"{{!EXTRACT}}\";s+=10;")

The code is not work.I need somebody to help.

Thank you very much !

Plus, what you are doing makes no sense. iMacros will take data from a website and modify it locally. iMacros is not going to make server-side changes to a website. Javascript is the way that you would do something like that. If you managed to make this run the way that you have it, then all you would be doing is taking a 7 and making it a 70 within your own computers realm. You could do that with VB or whatever. It would not make a change on the server end and if you are trying to use iMacros to update a server's html page, then that is way beyond the need, like killing a gnat with a sledgehammer. Javascript would do that with no issue whatever.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM