Tag Info

Hot answers tagged

11

The right time depends on the development process you are following. Using a simplified interpretation of an agile process would probably work best - pretty much anything that preaches interative development with fast & often builds + test execution after every build will do just fine. One thing to have in mind is Test-driven development which mandates ...


8

I have had some luck using Grinder. It is Java based but you can also write your scripts in Jython or Clojure. You said that you would like to take advantage of your team's current Selenium scripts and expertise performance testing. You did not describe your regression test scripts, but you may want to reconsider whether they are appropriate. In ...


6

I assume that you are not using stand-alone jar of selenium. Can you download Selenium Server Standalone jar and use it in eclipse. This is the only jar you need from selenium-java as it encompasses all required class files. You can remove other Selenium related jars from your eclipse.


6

Link to my blog where I discuss this in more detail. Inconsistencies here, are you using Selenium IDE or WebDriver with Java? Assuming you are using WebDriver with Java and not Selenium IDE(as you state in your post) You can try using: /* * Copyright (c) 2010-2012 Lazery Attack - http://www.lazeryattack.com * * Licensed under the Apache License, ...


5

There's a good thread here on Stack Overflow. Their answer is to use java sockets: Socket socket = null; boolean reachable = false; try { socket = new Socket(hostnameOrIP, 80); reachable = true; } finally { if (socket != null) try { socket.close(); } catch(IOException e) {} }


4

This sounds similar to a problem I dealt with recently using watir-webdriver (which, if you're using webdriver will be similar). In my case I was able to resolve/ workaround by sending a click at the element (to select it) before using sendKeys. So I suggest you could try sending a click to the element before using sendKeys. :)


4

In your comment you mentioned that the element is within a <frameset> \ <frame>. To work with any element within a frame, you need to first switch the context of the driver from the main page to that frame: driver.switchTo().frame("foo"); In this example "foo" would be the name of the iframe. You can also do it by index if the frame has no name ...


4

If your using Java, here is the JavaDoc If your using Ruby, here is the Ruby Docs If your using Python, here is the Python Docs If your using .Net, here is the .Net docs This will contain all of the functions that Selenium uses.


3

Our company runs Linux on our production machines. Rather than using the default distribution, we install only those packages necessary to run our software, because each additional, superfluous packages increases the risk that something will go wrong, e.g. a security hole or a resource problem. Similarly, you could argue that running tests in your ...


3

I generally use keyboard shortcuts with Robot class in Java in order to emulate what I would do manually. In IE 8, saving a file would be three steps: 1) Click link or Press Enter key on the link. 2) type S. 3) Hit Enter. I start with doing the same action manually for the first test case ie. save in a certain folder, cleanup the folder and click the ...


3

For the SOAP endpoints, you might be able to use what this person did along with SoapUI. It does SOAP/REST/JMS, and may also work for the other kind of endpoints (like the 'talking to each other' reference). Hm. Re-re-reading the question, you also ask about config/launch/monitoring. I didn't really answer that, did I? Given that you can get Jenkins to ...


3

I have this code running always when I instance IE8 on my tests. Works fine for me. #region SSL workaround for IE if (driver.GetType() == typeof(InternetExplorerDriver) && driver.Title.Contains("Certificate")) driver.Navigate().GoToUrl("javascript:document.getElementById('overridelink').click()"); #endregion


3

This question comes up a lot. Here is a possible solution, but it will require some additional development. You could use a customized HTTP proxy that acts as a pass-through filter except when it sees an HTTP 401 response. In the latter case, the proxy would respond with authentication credentials of your choosing. Here is how you might do it, in steps: ...


3

Mockito's documentation is actually pretty awesome, you should it give a try. There's also the mockito blog that covers some ideas and features behind mockito


3

Defect isolation The stacktrace Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at jxl.read.biff.SheetImpl.getCell(SheetImpl.java:288) at seleniumscripts.Excelreaddata.main(Excelreaddata.java:38) suggests that you are trying to access a cell that does not exist in the given sheet. I cannot match line numbers in stacktrace wuth ...


3

You didn't say how much precision you need -- do you just want to know which is faster, or do you want to know how much faster? Here are some factors that interfere with benchmarks like that: Clock granularity. I assume you will use something (System.currentTimeMillis, System.nanotime(), or a stop watch or whatever) to measure the time interval. The ...


3

It's in git so you could do a sparse checkout to get the JavaDoc part of the repo only. This blog post about sparse checkouts goes through it in a reasonable amount of detail: http://blog.quilitz.de/2010/03/checkout-sub-directories-in-git-sparse-checkouts/comment-page-1/#comment-3146 Or you could download them from maven central: ...


3

Actually, I can see two questions in your post. Is it better to test SOAP Web services backed by EJB using Java or C#? Actually, Web service stack of technologies was designed to support interaction between application written in different technologies, so it does not matter how the Web service was implemented. I.e., Web service implemented in Java can by ...


2

I don't have a direct answer to your question, but perhaps you can infer some things about Scala-based testing from my experience with Clojure -- another JVM-based language -- for testing against Java APIs I definitely believe some languages are better for writing tests than others. A lot of testing is about trying many variations of the same operation. ...


2

With Aspect Oriented Programming, you can use an annotation which executes Before (entering), After, or Around (before and after) a method. There isn't anything specifically designed to execute when entering a method, unless you used @After. For more information regarding the syntax and options, here is a link to Spring's online documentation: ...


2

The trick to handle any dialogs is to use external tools like AutoIT to deal with the Upload dialog, download Dialog and NTLM Authentication dialogs. Please note that this solution is intended only for users ecexuting the scripts in Windows environment. Using AutoIT you can write a simple script to get hold of the Save Dialog, this script can be then ...


2

I have worked on a few projects that seem very similar from the description you provide. One thing that works well that we are doing pretty much everywhere at my current company is storing information about each conversation in a database for the sole purpose of debugging and testing. This approach did take a little more upfront development cost, and ...


2

This is a common problem for software that spans services across multiple machines. I think you are on the right track. Each of your three solutions addresses a different part of the problem. The conversation ID is the enabler; the other two parts just make things easier. You will need a way to generate conversation IDs that does not create a ...


2

I Googled for "agentlib:jvmhook". The first link (http://www.learnqtp.com/forums/Thread-Could-not-create-Java-virtual-machine) suggests that your problem may be related to having installed QTP. Someone in that forum said, "There is a document from HP about how to fix your issue: http://support.openview.hp.com/selfsolve...t/KM543247". I am unable to access ...


2

jmeter I know it sounds like I'm beating a dead horse here, but this is the most commonly used open source tool. There is documentation all over the internet about using and setting it up. Additionally, if your company is a java shop, there are probably many developers who could help your team get started.


2

I ll suggest Jmeter for Performance... As the name indicates Jmeter is one of the Java tools which is used to load testing client/server applications. Earlier it was used for testing Web Applications only however now-a-days its being used for other test functions. It is typically used to measure performance and to load test functional behavior of ...


2

jyotsna, the answer to your question is right in front of you. :-) Look at these 2 statements compared to the same statements in your code above and identify the variable that is changing. Excelreaddata.username =s.getCell(0,1).getContents(); Excelreaddata.password =s.getCell(1,1).getContents(); Instead of hard coding the row and column values, create ...


2

A Sleep method is almost always the least acceptable way to synchronize an automated test. A better approach might be to register an event and check the event is raised when in the desired state, or use a polling loop which will can enable the test to proceed when the system is ready (e.g. an element id appears), or a timeout occurs if it takes more than a ...


2

What kind of hidden objects are you looking for? If it's any HTML tags with the attribute display: none; try using List<WebElement> elements = driver.findElements(By.cssSelector("[display=none]")); int count = elements.size(); This uses CSS matching to find all HTML elements with the display attribute equal to none. Then get the size of the returned ...


1

I use the following code to switch to an iFrame that's embedded in my HTML, although I am unsure if it will help in your dialogue box: driver.switchTo().frame(0); WebElement webelement= driver.switchTo().activeElement(); ((JavascriptExecutor) driver).executeScript("document.body.innerHTML = '<br>'"); //do whatever with ...



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