web-testing

Page Object Pattern Implementation with CasperJS

▼魔方 西西 提交于 2019-11-30 18:17:34
问题 Is there anyone who have already implemented the famous "Page Object Pattern" with casperjs, it's very useful for test maintenability in the long term ? It's very very cool to use that when you have to separe the mechanics and the purpose of your tests. it become more pleasurable to write your tests this way. There are some examples with ruby and selenium: http://blog.josephwilk.net/cucumber/page-object-pattern.html https://code.google.com/p/selenium/wiki/PageObjects 回答1: Here is an exemple

Is drag-and-drop possible in watir-webdriver?

戏子无情 提交于 2019-11-30 17:29:10
I would like to drag-and-drop one element to the position of another, triggered from within a watir-webdriver script. By "drag-and-drop" I mean picking up a draggable element and releasing it on another. By "possible" I mean any method for drag/drop that can be executed from a watir-webdriver script. This includes code snippets, third party gems, etc. As I understand it drag-and-drop is a feature request for core watir-webdriver (at time of asking), so I'm looking (in principle) for an alternative. UPDATE drag-and-drop is now part of core watir-webdriver (as of 0.5.0, I believe) UPDATE 2 For

Is there a way to test a web site on the iPhone without an iPhone?

一个人想着一个人 提交于 2019-11-30 16:53:45
问题 I want to test a website to see how it works with the iPhone but I don't own an iPhone or an iPod touch. Is there a way I can test how the site works on them without owning one? What I'm really after is fixing how Stackoverflow's WMD markdown editor works on the iPhone. I hear that the hyperlink and image prompts are created too high. I think I know how to fix that but it's pretty tough to develop blind. 回答1: If you own a Mac, you can download the iPhone SDK which comes with an iPhone

Right way to test page load time in selenium?

﹥>﹥吖頭↗ 提交于 2019-11-30 12:16:28
问题 I'm trying to programatically test the load time of a list of websites. The purpose is to roughly simulate the page load time a user will perceive. My first approach is to call the following inside a loop: startTime = System.currentTimeMillis(); driver.get("http://" + url); diff = System.currentTimeMillis() - startTime; System.out.println("Load time was " + diff); The problem is sometimes I get the time result before the page has really loaded (i.e i get 50ms times) so I guess the control is

Is drag-and-drop possible in watir-webdriver?

寵の児 提交于 2019-11-30 01:50:04
问题 I would like to drag-and-drop one element to the position of another, triggered from within a watir-webdriver script. By "drag-and-drop" I mean picking up a draggable element and releasing it on another. By "possible" I mean any method for drag/drop that can be executed from a watir-webdriver script. This includes code snippets, third party gems, etc. As I understand it drag-and-drop is a feature request for core watir-webdriver (at time of asking), so I'm looking (in principle) for an

Web Testing for IE. How accurate is IETester?

烂漫一生 提交于 2019-11-29 20:37:58
I am using IETester for testing web sites with IE. I find it quite frustrating that it crashes frequently. More importantly, it does not seem to be too reliable. Sometimes, a site looks broken in IETester's IE8 but looks fine in real IE8. (I suspect that HTML5Shiv didn't load correctly in IETester at times) Anyone experiencing the same problems? What alternatives do you use? I once resorted to using Windows 7's XP Mode to run IE7 then use Windows 7's IE8 (meaning) that I didn't upgrade to IE9 :( also I wont be able to test IE9... I think that setting up many Virtual PC's for each browser will

How to find specific lines in a table using Selenium?

一个人想着一个人 提交于 2019-11-29 18:48:49
问题 Here is an example code: <div id="productOrderContainer"> <table class="table gradient myPage"> So this table being in productOrderContainer has several columns and depending on several things will have several rows which all have several columns. An example is: What I want to do is to for example get the first row of this table. ( rows have id's such as: <td rowspan="1"> ) And then again for example in this rowspan look for a specific value in a specific <div> So in psudo-code what I want to

Watir: Need to double click on an element to open custom popup

痴心易碎 提交于 2019-11-29 12:44:44
I am a newbie in WATIR. The problem I am facing is - The application I am testing has thumbnails (like Windows icons) placed on the page and I need to double click it. On doing that, an custom popup (ajax popup implemented in javascript) will open. The fire_event("ondblclick") is not working for me. I also tried 'click' twice but that too is not helping. Is there any other way of handling this? Your help is highly appreciated. Added 6 July 2010: I solved it but I have another query now. Below was the HTML for which I was able to solve using "@ie.div(:class,'GridElementInlineIE').fire_event(

How to disable Flash in Firefox with Selenium in Python?

坚强是说给别人听的谎言 提交于 2019-11-29 07:05:17
Trying to disable Flash in Firefox with Selenium in Python, using profile settings. This question specifies a way to do it through the GUI, but it would be better for this particular use case to do it programmatically. Specifically, the best possible solution would allow Flash to be disabled in a newly created profile object. Thanks very much! You can disable flash using the below profile. from selenium.webdriver.firefox.firefox_profile import FirefoxProfile def disableImages(self): ## Firefox profile object firefoxProfile = FirefoxProfile() ## Disable Flash firefoxProfile.set_preference('dom

Is there a good IE-based Selenium IDE? [closed]

牧云@^-^@ 提交于 2019-11-28 20:10:21
The SeleniumIDE project is based on Firefox (and its plugin architecture). My application (for a variety of reasons) only runs on Internet Explorer (6+). In fact, we actively check for non-IE browsers and do an immediate redirect. This is a 6 yr old codebase and we're trying to remove all of the html idiosyncrasies that necessitate our IE dependence. We've already got a robust and growing set of NUNIT tests for code. We would like to add Selenium to do Web functional testing. Is there a good IDE for building/recording Selenium tests using IE as the browser? Selenium does not have an IDE for