我是Watir的新手。我已经安装了Watir 3.0.0。 amd Ruby 1.9.3。我正在编写脚本来自动化Web应用程序。它有一个论坛,里面有一个Rich Text Box来发表评论。我找不到任何属性,如脚本中的Rich Text Box的名称和ID。如何自动化它?我想在其中输入文本并自动化Rich TextBox。Ruby脚本编辑RichText编辑器
请帮我写我的Watir脚本。
<td>
<select>
<option value="Trebuchet MS,Verdana,Arial,Helvetica,sans-serif">
Trebuchet
<option value="arial,helvetica,sans-serif">
Text - Arial
<td>
<div class="space"/>
<td>
<select>
<option value="1">
Text - 1 (8 pt)
<option value="2">
Text - 2 (10 pt)
<td>
<div class="space"/>
<table border="0" cellSpacing="0" cellPadding="0">
<tbody>
<tr>
<td>
<div title="Justify Left" class="button">
<img style="width: 18px; height: 18px;" src="http://xxxxx.com/images/ed_align_left.gif" complete="complete"/>
<td>
<div title="Justify Center" class="button">
<img style="width: 18px; height: 18px;" src="http://xxxxxxxx.com/images/ed_align_center.gif" complete="complete"/>
<iframe class="iframe" src="http://xxxxxx.com/blank.html" style="width: 591px; height: 334px;">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<base href="http://xxxxxx.com/forum/"/>
<style type="text/css">CSS Stylesheet</style>
<body contentEditable="true">
<font size="2"/>
这就是它的样子。这是我试图测试的一部分代码。 ContentEditable = true表示文本框。如何脚本测试编辑使用Ruby的文本框...?帮帮我!!!
感谢您的信息查克...请帮助!
请提供指向该页面或类似HTML或相关HTML的链接。 –
我正在测试我的组织的网站,所以我不能透露富文本框网站。但我可以分享它的外观形象,但这里没有选择......请指导......我还没有在其他地方找到它...... – user1395264
你为什么要创建另一个问题? http://stackoverflow.com/q/10995107/17469请编辑这一个,而不是创建新的问题。 –