English 中文(简体)
如何与使用Selenium IDE的iframe元素进行互动?
原标题:What is a good way to interact with iframe elements using Selenium IDE?
最佳回答

我提出了一个解决办法。 它涉及使用Selenium IDE sstoreEval方法、storedVars变量和匿名功能。 它还利用<条码>活性成分的财产<条码>。

基本上,我所说的话是<编码>。 Eval, 采用javascript, 为职能I规定一个要素:storedVars,以后将作为理由使用。 <代码>FCKeditor 例如,论点是:

storedVars["setFCKeditorField"] = function (fieldName, value) {var iframe = this.browserbot.findElement("id="+fieldName+"___Frame"); var outerDocument = iframe.contentDocument; var innerDocument = outerDocument.activeElement.contentDocument; var textField = innerDocument.activeElement; textField.innerHTML = value;}

我已把这种方式与目标相仿,因为这正是它在塞伦堡的民主选举所展示的方式,而且我显然不理想。

随后,当我实际上想确定CantKeditor油田的价值时,我再次用javascript打上storeEval,称这一功能为理由:

storedVars["setFCKeditorField"].call(this, "SU_ats_subscription_configuration_model[subscription_reminder_message]", "Subscription Expiring Message.<br/>");

这样做,但我希望有更好的办法。 RC 驻地协调员是否容易这样做?

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签