Is there anyway by which I can automate the following steps in Selenium-rc
无论如何,我可以在Selenium-rc中自动执行以下步骤
- open a page
- click on bookmarklet in browser toolbar
- fill up data in the form loaded into the page by said bookmarklet.
打开一个页面
单击浏览器工具栏中的bookmarklet
通过所述bookmarklet填充加载到页面中的表单中的数据。
If the bookmarklet is not accessible as it is part of the browser/bookmark toolbar, is there a way in which I can inject the javascript into the page and have it execute?
如果小书签不可访问,因为它是浏览器/书签工具栏的一部分,有没有办法可以将javascript注入页面并让它执行?
1 个解决方案
#1
You are 99% there! You're right, you can't actually click the bookmarklet, but you can inject the same JavaScript in to the page. Simply use the getEval() command to evaluate the JavaScript.
你99%在那里!你是对的,你实际上无法点击书签,但你可以将相同的JavaScript注入页面。只需使用getEval()命令来评估JavaScript。
#1
You are 99% there! You're right, you can't actually click the bookmarklet, but you can inject the same JavaScript in to the page. Simply use the getEval() command to evaluate the JavaScript.
你99%在那里!你是对的,你实际上无法点击书签,但你可以将相同的JavaScript注入页面。只需使用getEval()命令来评估JavaScript。