selenium-ide

How to get actual JavaScript value in onclick from webbrowser control?

非 Y 不嫁゛ 提交于 2019-11-29 02:47:42
问题 I'm looking for a way to get the JavaScript code defined inside of onclick. I'm using .NET 2.0 C# Visual Studio 2005. Example: <span id="foo" onclick+"window.location.href='someURL'>click here</span> My goal is to get the string "window.location.href='someURL'" . Scenario: A user clicks on web page element, the tag shown above for instance, inside of WebBrowser control. Then the clicked tag is refereed to H tmlElement object . In WebBrowser control I then call HtmlElement object's

Selenium: How to wait for options in a select to be populated?

半城伤御伤魂 提交于 2019-11-28 23:18:15
I am using Selenium for the first time and am overwhelmed by the options. I am using the IDE in Firefox. When my page loads, it subsequently fetches values via an JSONP request, with which it populates options in a select. How do I get Selenium to wait for a certain option in the select to be present before proceeding? I think you should be use waitForElementPresent command. If possible let's me see your selenium IDE code. I used waitForElementPresent with a css target . Example: To wait for <select id="myselect"></select> to be populated with <option value="123">One-two-three</option> use

How to loop tests in Selenium IDE?

允我心安 提交于 2019-11-28 20:07:28
I've been testing in Selenium IDE. It's pretty easy to use, and I have created some test cases with it. I've been searching Google, trying to find a way to repeat my tests automatically. I've seen a solution with gotolabel, while loops, etc. But I couldn't make any of them works. Can someone give me a tip on how to loop my test n times, or loop forever. I appreciate any help. Prashant Vadher Do this: Download this js file: https://github.com/darrenderidder/sideflow/blob/master/sideflow.js Launch Selenium IDE from Firefox and open the options menu. Upload the .js file to the "Selenium Core

click command in selenium webdriver does not work

微笑、不失礼 提交于 2019-11-28 18:12:16
I have just recently done an export of my selenium IDE code to selenium web driver. I have found that a lot of the commands that worked in IDE either fail to work or selenium web driver claims to not support at all. So far I've been tackling these issues one at a time which is less than ideal... Currently I'm working on finding out why clicking on a button does not work with web driver while it had previously worked in selenium IDE. My browser is FF 13 and my OS is Ubuntu. Code Snippet WebElement loginButton = driver.findElement(By.name("submit")); loginButton.click(); I had previously tried

Selenium IDE - Command to wait for 5 seconds

孤者浪人 提交于 2019-11-28 18:05:04
问题 I´m using the Selenium IDE for Firefox and searching for a wait command. My problem is that I want to test a website with a embedded external map. This external map needs 3-5 seconds to load. My commands: open /Page/mysite.html //Wait Command? (5 seconds) ClickAndWait link=do something 回答1: Use the pause command. Set speed to fastest (Actions --> Fastest), otherwise it won't work. 回答2: This will delay things for 5 seconds: Command: pause Target: 5000 Value: This will delay things for 3

How to upload file in selenium-ide 3-7-4

拟墨画扇 提交于 2019-11-28 14:50:03
we need to switch to the second window select title is not working in this case how can we do that please enter image description here 1) Using sendkeys we can send file path name:- It’s the most basic technique to perform the upload of a file.Get the file upload element either by using the Id or Name. And call the Webdriver’s sendKeys() method to set the value of the file to upload. Remember following two things when uploading files in WebDriver 1)There is no need to simulate the clicking of the "Browse" button. WebDriver automatically enters the file path onto the file-selection text box of

How to record popup windows with selenium IDE

自闭症网瘾萝莉.ら 提交于 2019-11-28 12:47:28
While recording through Selenium IDE, When a pop up window opens it is not getting recorded. "At the time of executing an error message is displayed.Please help me out. If that pop up window has name, like opening from javascript window.open(URL, name). Then it is possible to add the command to check the content of the popup. Like following command: waitForPopUp | winId | 30000 selectWindow | winId ... close However, if the window has no name, like opened from <a target="_blank"> then you are out of luck. Go to http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ#SeleniumCoreFAQ

Java and Selenium for web form filling?

偶尔善良 提交于 2019-11-28 11:41:57
问题 I wanted to fill a web form automatically. I used Selenium IDE to create a script which ENDS with a command that searches for the specified text in the webpage. I wanted to take action based on this TEXT. If text = congratulations, then send an e-mail to some address. If not, then click ok button. I don't think the Selenium IDE can do this If-else logic and send mail on its own (Using if / else in selenium ide). So, I thought of using Java code to "run" this Selenium HTML script, find out if

Selenium 2.53 or 2.48 not working in Firefox 48.0

拈花ヽ惹草 提交于 2019-11-28 08:23:40
问题 I am getting an error in Firefox 48.0 in new the update from firefox 47 Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 066 addons.xpi DEBUG Updating database with changes to installed add-ons My system and browser configuration are: Firefox 48 Selenium 2.48 also try 2.53 Window 8 64bit I also tried the marionette driver but did not receive proper output with that. Any ideas on how to fix this besides downgrading firefox? 回答1: Older versions of

Why do we use WebDriver instead of Selenium IDE?

两盒软妹~` 提交于 2019-11-28 03:55:57
Why can't we just record all of our test cases in Selenium IDE , export it to Java/WebDriver and run it in WebDriver with Eclipse? I need a clear explanation as I am very much confused in using WebDriver! And can anyone please explain why IDE recorded scripts fail in WebDriver? why cant we just record all of our test cases in IDE, export it to java/webdriver and run it in webdriver Great question, and here is the answer: Selenium IDE is a Record and Playback tool, which is very easy to use, but it's very unreliable. Record and playback is typically a frowned upon in web applications. Since web