简体   繁体   中英

Write on contenteditable div? imacros

I'm building a imacros scrip but can't seem to write on a contenteditable div.

This is the scrip that imacros makes up when I click to make a comment.

TAG POS=2 TYPE=DIV ATTR=TXT:Add<SP>a<SP>comment...
TAG POS=1 TYPE=DIV ATTR=CLASS:Pf&&TXT:

While I'm typing there's nothing happening in the scrip unless I click on the comment again then it writes this.

TAG POS=2 TYPE=DIV ATTR=TXT:"whatever I typed"

But when I run it, it says

RuntimeError: element DIV specified by TXT:"whatever i typed" was not found, line 6 (Error code: -921)

The html for the comment:

<div id="z13uu53isp2oj3z1n23tspvykmzcgztxv04.editor" jsname="L9AdLc" class="cp"><div class="Pf"><div dir="LTR" role="textbox" g_editable="true" class="df b-K b-K-Xb URaP8 editable" id=":39.f" contenteditable="true"><br></div></div></div>

<div class="Pf"><div dir="LTR" role="textbox" g_editable="true" class="df b-K b-K-Xb URaP8 editable" id=":39.f" contenteditable="true"><br></div></div>

Is there any way around this? or a different program that'll be able to do this.

您应该尝试使用“ POS = 1”而不是“ POS = 2”,似乎只有一个标签带有指定的文本,并且您尝试查找第二个标签:

TAG POS=1 TYPE=DIV ATTR=TXT:"whatever I typed"

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