我在使用水豚測試tinymce形式時遇到了麻煩。我正在使用tinymce-rails,並在我的表單中有7位編輯。另外我使用tinymce的asciimath插件。如何使用水豚和硒填充錫-鐵欄編輯器?
一切工作正常,但我無法編寫測試來填寫tinymce編輯器。
這裏是我的步驟定義代碼的樣子,非常類似於描述here:
within_frame("content_ifr") do
editor = page.find_by_id('tinymce')
editor.native.send_keys 'test'
end
問題是,當我運行以下命令:
editor.native.clear # works, clear the editor area, I'm testing this with pry
editor.native.send_keys :tab # works, moves focus to next input
editor.native.send_keys 'test' # returns "", nothing happens, nothing in editor
所以clear
和send_keys :tab
工作如預期。但我無法發送任何字符串。 send_keys
函數總是返回空字符串,並且當我使用pry進行測試時沒有任何反應。
這裏怎麼回事?以及如何調試/調查問題?
謝謝。
請參閱http://code.google.com/p/selenium/issues/detail?id=3569 – 2012-07-23 16:54:42
感謝您的幫助Andrey。我也看到了那個頁面,並決定在之後切換到chrome。 – 2012-07-25 12:35:43