2014-09-26 84 views
0

的主編編輯器的HTML結構鍵入內主編主編的樣子:如何使用硒IDE

<div class="redactor_text redactor_optional redactor_editor" contenteditable="true" dir="ltr" style="height: 373px;"> 
    <p>dummy text​</p> //Here is where the text written inside the editor goes 
</div> 

所以到主編編輯,我需要追加p標籤內的文本里面寫。我無法找到使用Selenium IDE執行此操作的方法。任何幫助將非常感激。感謝提前:)

回答

2

我已經找到了解決這個問題:

<td>runScript</td> 
<td>$('#editor').html('text that you want to put there');</td> 
<td></td> 

這適用於我們的HTML看起來像這樣: ID =「編輯」級=「所見即所得的編輯器」 CONTENTEDITABLE = 「真」 的風格= 「溢出:滾動;最大高度:300像素」>測試

+0

​​的runScript ​​$( 'redactor_editor ')HTML(' 要放在那裏的文本')。 ​​ --->工作完美:)謝謝。 – Rads 2015-05-07 11:34:05