Hot answers tagged

8

Burp Suite would be worth checking out if you're fuzz testing web applications. As the name implies, it's actually a suite of different web security testing tools - I used it for the first time on Monday in a pen testing workshop and it seems like a tremendously useful tool. Burp Intruder is the tool used for fuzzing attacks - and here's a video tutorial ...


7

Here is a script which loads jQuery through WebDriver. I've been using it successfully for quite some time. Features: -- will not overwrite any existing jQuery instance. -- will not alter the DOM under test or pollute the global namespace -- cleans up after itself to avoid memory leaks -- waits for jQuery to be fully loaded before returning. -- takes an ...


7

Please use below code. driver.get("http://www.flipkart.com/"); driver.manage().window().maximize(); driver.findElement(By.linkText("Trimmer")).click(); WebElement scroll = driver.findElement(By.id("brand")); scroll.sendKeys(Keys.PAGE_DOWN);


7

See, you can learn Selenium with any language, whether it is C#, Java, Ruby, Python etc. It doesn't matter whether the application you are going to test has been developed in the same language that you would use to write your test scripts, you can test an application developed using C# in Selenium with test scripts written in Java. In addition to that, you ...


5

I am assuming that you: want to become competent programmer, with goal to learn programming beyond Selenium automation. have nobody around to ask for guidance (if you do, ask locally) also want to be able to write simple tools supporting QA tasks, and beyond. Python is widely considered as best language for beginners (MIT among others). It works much ...


4

In the company I'm currently working on, we tested out some testing frameworks out there, and we finally decided to go with Jasmine. This is what we found: JsUnit: This is one of the oldest unit testing framework, that was later being maintained by Pivotal Labs. But even they are using Jasmine now :P. JSpec: This is an RSpec like BDD unit testing framework....


4

Jasmine is a BDD tool for JavaScript.


4

In terms of UI automation, neither Javascript or jquery are used much at all. I don't know of any tools that allow you to write UI automation in Javascript, although I bet if you looked you could find some. Javascript and jquery are useful for unit testing or more advanced integration testing, but that doesn't sound like exactly what you were asking for. ...


4

I recommend you try TestCafe. It is a web testing framework, using which you can run tests on remote computers and mobile devices, in multiple browsers and on multiple machines simultaneously. It also eliminates out of process browser plug-ins and provides wrapper-free access to DOM via jQuery or a browser's API. The built-in traffic analysis tool ...


4

There are two sides of your question which I am interpreting (and may be I am wrong), but this is how I see it : You can choose your language based on the ease of learning. You can choose your language based on the support for that particular implementation. Let's talk about first- I have used both Python and Java implementations and I agree with Peter, ...


3

I use PhantomJS to regression test the look and layout of Web Pages, it is written in Javascript. You might also want to look into CasperJS, PhantomCSS and dpxdt (developed by some testers at Google) which are all related. TestComplete generates code in JScript (equivalent to JavaScript), which is a pretty powerful functional testing tool. As mentioned ...


3

What you're looking for is called a javascript profiler. Most modern browsers include some kind of a profiler with their developer toolkits. Here are some links Chrome JS Profiler Firefox JS Profiler A good code profiler (JS or not) will tell you who started what function call (stack trace or call tree), how long the particular function was running and ...


3

I have very good experience with the open source FunkLoad for load testing web-applications. Has a test recorder (Uses proxy to record browser actions) Generates Python code as test (You can edit it with a text editor) Supports HTTP sessions and very complex scenario's (Login as users) Scales up to a large number of threads per CPU Has a great benchmark ...


3

I haven't tested this, but in theory it should work. You can use javascript like this to load new js files into memory: var scriptElt = document.createElement('script'); scriptElt.type = 'text/javascript'; scriptElt.src = jsFile; document.getElementsByTagName('head')[0].appendChild(scriptElt); You would need to load all of the jquery javascript libraries ...


3

Apologies to all for duplicating this question. Turns out, that indeed, the failing script in question lives on a separate domain than the place where my error.js was being included from. So, it was indeed a cross-domain trigger of "same origin".


3

I've been using zombie.js for headless testing. Unfortunately, it doesn't have all the nice stuff like Spies in Jasmine, but you might be able to use jasmine-node if you need that.


3

I would recommend you taking a look at Jasmine if you like BDD style testing/specifications. Seems to be growing in popularity as well. There are a couple of screencasts on using Jasmine available on the net so you should have no trouble getting started. Check it out at: http://pivotal.github.com/jasmine/


3

I think qUnit is a popular test framework for javascript, though I haven't used it personally. jQuery uses it, though: http://docs.jquery.com/Qunit


3

I haven't used it myself (although I plan to on my side-project when I get it to private alpha stage) but I think Hexawise would be able to do some of this. You can tweak the phasing parameters (2 pairwise, 3 pairwise, I think it goes up to 6) and it will generate values in certain ranges. This should be pretty close to what you're looking to do. You can ...


3

Selenium is not designed to play in this way. Still on Selenium you can run your own JavaScript functions. In this case you can try override function which you want to disable (e.g. function functionWhichYouWantToBeDisabled(){return null;}). In this way it not be disabled but removed/changed functionality temporally. All what I say is more in theory level, I ...


3

Yes, you can run headless with either Headless Chromium or with PhantomJS .. Keep in mind that running with Selenium Grid or SauceLabs is equally as good as running headless.


3

Given that there is disagreement, the answers this question attracts will probably gravitate toward sometimes rather than yes/no. My opinion is that page objects should have assertions in their constructors, so that my code doesn't offer page methods for a page I never reached. In a made up example, I don't want to return an account page object when I've ...


3

WebDriverJs is just the driver to control the browser. For the tests itself I recommend a JavaScript based testing framework like QUnit or Mocha. The test framework take care of the test reports. Mocha is also mentioned on the WebDriverJs wiki page. You can find more information about how the reporting works on the official websites. QUnit: Bottom left of ...


3

If your edit class is unique on the page, then you can do .edit If you need to be a bit more specific, you could do more along the lines of .active.editing input.edit The point is, theres no "right" answer here, there are often many different css selectors you can build that can point to the same element. You want to find the balance between being short, ...


3

You can't click hidden elements with Selenium. However, you can trigger the click through Javascript, as found on SO: JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("arguments[0].click();", element);


2

Does it have to be a JavaScript object? Do these help? http://www.allthingsquality.com/2010/04/some-strings-for-pasting.html http://www.allthingsquality.com/2010/04/general-input-tests-for-time-fields.html http://www.allthingsquality.com/2010/04/general-input-tests-for-listbox-fields.html http://www.allthingsquality.com/2010/04/general-input-tests-for-...


2

If your page reloads during waitForElement function execution then you have to refresh element by finding it once again. Try to use selector as parameter an not the element and use findElement function: function waitForElement(selector, timeout, step) { if (step == null) { step = 0.5; } if (timeout == null) { ...


2

Why do you want to do headless testing? Is it purely due to the environment (such as I want to be able to run some automated tests on a build server that does not have a graphical subsystem)? Regardless of the answer to the above, whatever solution you choose, the final target environment should shape your answer. For example, you could use the HtmlUnit ...


2

Here is my extension method I am using with WatiN The parameter Browser – is WatiN’s browser object. And also, WitiN required to pass the JavaScript code as a single line. That is why you can see .Replace("\r\n", ""); in the code: public static void InjectJQuery(this Browser browser) { string injectjQuery2 = @" function ...


2

remove the assignments: <tr> <td>storeEval</td> <td>location.pathname.split( '-|' )[1]</td> <td>new</td> </tr>



Only top voted, non community-wiki answers of a minimum length are eligible