Tag Info

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 ...


6

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);


5

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 ...


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 ...


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 ...


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

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

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

Jasmine is a BDD tool for JavaScript.


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

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 ...


2

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.


2

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/


2

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


2

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".


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 ...


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

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 ...


2

As elcharrua writes you can use JavaScript in Java tests with the JavascriptExecutor. This will execute the JavaScript in the Selenium browser session if it was JavaScript from the website itself. But if you want to write the whole test in JavaScript look at WebDriver.JS Simple example var webdriver = require('selenium-webdriver'); var driver = new ...


2

Jasmine is a behavior-driven development framework for testing JavaScript code. http://pivotal.github.io/jasmine/


2

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 ...


2

You need to tell it to return the value. Change this line: String mainURL = (String) js.executeScript("productObj.mainURL"); to: String mainURL = (String) js.executeScript("return productObj.mainURL");


2

Possibly the biggest one from my perspective would be the data validation: most modern web applications are pulling data from some kind of data source and rendering it, then interacting and modifying the data based on user interaction. JavaScript, and particularly JavaScript/AJAX, can make finding web controls "interesting", since the page itself can be ...


2

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 ...


2

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 ...


1

(You did not say how many simultaneous users you need to simulate for your stress test. My answer assumes you need to simulate more than 5 or 10.) Using your Selenium tests as the basis for stress testing is an attractive idea. After all, they are already written/debugged. You would like to check the same things under load, so they seem relevant. And ...


1

Yes, it does, and even if we (our company) don't do it currently, we are working towards it as a goal. One way (to gain speed) is use PhantomJS - headless browser (it executes all commands but does not paint screen unless you want a snapshot). This might, or might not, count as "browser environment". Another way is to use advanced JS framework like ...


1

To perform a 'mouse hover' action, you need to concatenate all of the actions that you want to achieve in one go. With the actions object you should first move to the text box, and then move to the edit icon and click it. Below is my attempt at sample code to perform Mouse hover; //Move to the Textbox Actions actions = new Actions(driver); ...


1

That is a reasonable list, but people tend to solve these problems by glueing different frameworks together. In particular, saving results to a database, generating reports, and sending emails may be well-served by Jenkins. Selenium has APIs for a number of languages -- I assume that is the part you want to script. Virtually any open-source testing ...



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