selenium-ide

How do I test modal dialogs with Selenium?

微笑、不失礼 提交于 2019-12-19 00:23:42
问题 I'm getting started with Selenium IDE and trying to test a webapp that's full of modal dialogs ( window.showModalDialog ). Recording the test seems to work (except there's nothing in the log when the dialog pops up) but they don't play back properly. The script actually opens the window (triggered by a button click), but then just waits indefinitely. Any suggestions? 回答1: From the Selenium FAQ, Selenium apparently works with some types of dialogs but not others: I can't interact with a popup

selenium ide loop through array variables

跟風遠走 提交于 2019-12-18 17:30:21
问题 in selenium ide, i have built a test case, in which a array variable stores the values. i have used while loop to print those array variables. here i have used "getEval | myarray[0]" to print the first value which is 'postgresql'. but the value is not listed. no error occurs. [info] Executing: |getEval | myarray = new Array('postgresql','mysql'); | | [info] script is: myarray = new Array('postgresql','mysql'); [info] Executing: |getEval | index=0; | | [info] script is: index=0; [info]

Understanding Selenium IDE vs Selenium RC

╄→尐↘猪︶ㄣ 提交于 2019-12-18 13:37:46
问题 What is the difference between Selenium IDE and Selenium RC with its functionality? 回答1: Selenium IDE is a firefox plugin that gives you a basic recorder for recording tests. These tests are recorded in an HTML table based architecture using keywords, and IDE gives you the ability to then export the code out to other languages (Java, .Net, PHP, Python, Ruby, or Perl). Selenium RC is an API accessible from multiple languages. Rather than recording tests, you write programs that call into the

Unable to launch IE browser in selenium webdriver

随声附和 提交于 2019-12-18 13:29:03
问题 I have written a sample code to launch IE browser and load google page. public class Sample { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("webdriver.ie.driver","H:/IEDriverServer.exe"); WebDriver driver=new InternetExplorerDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS); driver.get("http://www.google.com"); } } But when I run this script it launches browser and it gets closed

Get element with jquery and selenium IDE 1.0.8

懵懂的女人 提交于 2019-12-18 13:13:05
问题 I'm trying to get element with jquery and Selenium IDe 1.0.8. <td>storeValue</td> <td>$('#result').find('img').filter('[alt="NameOfPhoto"]').eq(0)</td> <td></td> And in log I get [error] Element $('#result').find('img').filter('[alt="NameOfPhoto"]').eq(0) not found When I put this command in firebug I get this element :/ Why it doesn't work ? EDIT: Alternatively for example you can give me code how to get id of first object whith JAVA tag at main page of stackoverflow. TAG: <a rel="tag" title

Click a button with XPath containing partial id and title in Selenium IDE

依然范特西╮ 提交于 2019-12-18 12:54:25
问题 Using Selenium IDE, I'm trying to click a button within a table on a webpage using XPath with a partial id and a title from the element. The XPath I'm using is: xpath=//*[contains(@id, 'ctl00_btnAircraftMapCell')]//*[contains(@title, 'Select Seat')] and thats the entire html code for an example of the buttons im trying to click: <li id="ctl00_MainContent_repAircraftMap_ctl20_repAircraftMapRow‌​_ctl00_liAircraftMap‌​Cell" class=""> <a id="ctl00_MainContent_repAircraftMap_ctl20

Selenium WebDriver - Finding Elements using cssSelector and nth child

旧街凉风 提交于 2019-12-18 12:22:25
问题 <ul> <li class="active"> <a href="#"> <i class="fa fa-home"></i><br> <span class="title">Home</span> </a> </li> <li> <a href="#"> <i class="fa fa-rss-square"></i><br> <span class="title">Posts</span> </a> </li> <li> <a href="#"> <i class="fa fa-calendar"></i><br> <span class="title">Events</span> </a> </li> <li> <a href="#"> <i class="fa fa-bar-chart-o"></i><br> <span class="title">My Activity</span> </a> </li> <li> <a href="#"> <i class="fa fa-edit"></i><br> <span class="title">Assessments<

Selenium IDE: How to Pass Variables

爷,独闯天下 提交于 2019-12-18 11:40:52
问题 I have 3 different accounts in a website that I want to login and print a report every single day. I've done a Selenium IDE recording that allows me to login and print the report, however, every day I have to change the variable 3 times (for the 3 different usernames and passwords). How can I pass a variable to the "value" field of the "type" command? Thank you. Best, 回答1: You can go with parameterization For parameterization you need to create js file For eg. Js file contains var username =

Selenium is not able to launch the IE.

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 10:26:29
问题 Selenium is not able to launch the IE. 10:56:25,005 INFO [org.openqa.selenium.server.SeleniumDriverResourceHandler] Command request: getNewBrowserSession[*iexploreproxy, http://192.168.132.105:8080/, ] on session null 10:56:25,005 INFO [org.openqa.selenium.server.BrowserSessionFactory] creating new remote session 10:56:25,005 INFO [org.openqa.selenium.server.BrowserSessionFactory] Allocated session 9fa93fe865904e3da895c91a86ebdcb0 for http://192.168.132.105:8080/, launching... 10:56:25,005

How to automate username/password fill for firefox authentication popup using selenium IDE

核能气质少年 提交于 2019-12-18 09:14:20
问题 I got a selenium script that works, but when it is opened with selenium-rc it is in a new instanced which requires me to re-login. Is there a way to automate filling in the username/password for the "authentication required" window that pops up? I have tried the following but it doesn't work: http://username:password@site.com/ instead of http://site.com/ Any ideas other than calling another script like autohotkey? 回答1: I ended up using AutoIT with a login script containing the following and