<div class="Rd" guidedhelpid="sharebox_editor">
<div class="eg">
<div class="yw oo"></div>
<div class="yw VK"></div>
</div>
<div class="URaP8 Kf Pf b-K b-K-Xb">
<div id="207" class="pq">Share what's new...</div>
<div id=":3s.f" class="df b-K b-K-Xb URaP8 editable" contenteditable="true"g_editable="true" role="textbox" aria-labelledby="207"></div>
我正在做的是这样的:
ghost.set_field_value(".df.b-K.b-K-Xb.URaP8.editable[role=textbox]", "jeanphix")
我收到“不支持的字段标签”错误
最佳答案
根据github来源,可以找到您的元素(否则会得到“找不到元素”错误)。但是,ghost.py仅允许将某些HTML标记与set_field_value(..)
方法一起使用:select,textarea,和输入(各种类型)。
由于您要在DIV上进行尝试,因此它会引发不受支持的标记错误异常。 “提高”在github上当前版本的第830行上:https://github.com/jeanphix/Ghost.py/blob/dev/ghost/ghost.py在此之前检查if/else语句,您应该能够明白我的意思
关于python - python Ghost.py不支持的字段标签错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26937587/