Tag Info

New answers tagged

0

To simulate complex (mouse) actions rather than working on the elements directly, use ActionBuilder. See the reply in this thread for a starting point.


2

You asked about quality, but then you asked about performance, so I assume you are specifically interested in performance. The short answer is no. There are tools that will analyze performance while it is running to tell you which parts of the code are the busiest. Those tools will not tell you whether you are using slow algorithms. And a hot spot is ...


1

Your test is failing and printing "S4:-Fail"? Double check the error messages on the site against the ones in your if clause. It may be failing because of trailing whitespace or something else not easily noticeable by eye. However, this is a good chance to start using asserts to avoid this problem altogether. The great thing about using assertEquals is ...


1

To find out if a specific element has focus, call element.equals(driver.switchTo().activeElement()) More info in this topic.


1

WebElement selectElement = driver.findElement(By.id("id")); Select listBox = new Select(selectElement); int size1 = listBox.getOptions().size();


0

this code worked how me. m not sure sam, does its correct way of coding verify it.. i used following code to locate element. driver.findElement(By.xpath("//input[@id='edit-box-big' and @placeholder='Job Title *']")).click()


1

This often happens when there are multiple elements that match your search and one of them is hidden and the other is not. If it finds the element that is hidden, you will get this error. I would search through the DOM for any other element with the name "title". You may need to provide additional information to ensure the identifier is unique and finds ...


0

Is Java the primary language used for Selenium tests? Do you recommend it over C# ? I prefer C# over Java mostly because Eclipse doesn't come close to Visual Studio. For a professional Tester/Test Architect/Test Programmer Visual Studio Ultimate is the best. However, both Ultimate and Professional editions are 100% integrated with TFS which brings ALM ...


1

Edit: updated reply to reflect the question better. With this code, Selenium selects the value in the dropdown. Possibly important: the value is visible (no scrolling needed) when the list is shown. But I'm using the same index as you, so that should make no difference. Beware, I'm not sure which demo page you used, I picked this one: ...


0

Your filename is illegal, colon : is not allowed in files names. 2015.02.10_12:18:41_report.xlsx Also see: http://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names I would replace getCurrentTime() with a timestamp or a GUID if the name needs to be unique. If you need the date remove the illegal ...


0

You can try using TestNG. Using TestNG Suite XML file you can execute tests in multiple browsers. http://kagrana.com/klab/testng-tests-on-multiple-browsers-in-parallel/


0

You may have to switch to childWindow to do operation on the same. driver.switchTo().window(Childwindow); you will have to use driver switch to. You can switch between windows as below: //Store the current window handle String winHandleBefore = driver.getWindowHandle(); //Perform the click operation that opens new window //Switch to new window opened ...


2

It depends on the definition of "Unit Test". The definition is very clear, yet there is still a large number of people who call things that really aren't Unit Tests "Unit Tests". Real Unit Tests test small units of code, usually a single class consisting of up to 200 lines of code. If a developer writes a new class by first writing Unit Tests, they put a ...


5

A perspective from a developer: A unit test is best written in conjunction with the code it's testing. It will shape the code to some extent: the need to write a test forces the code to be easily testable, which limits some code smells/anti-patterns. For example, a method that directly calls the database to obtain a user name will be hard to unit test until ...


1

Is it difficult? This greatly depends on your development skills, but as unit-tests are often derived from from a TDD cycle I would think creating tests after the work is done is very hard. Its better to first write the tests first and then the code. I would suggest you start reading the book "Test Driven" (it uses Java), this will make you understand ...


1

Mostly we have heard and read that whitebox testing can be done by Developer not Tester. It is because developer have more and depth coding knowledge. But If you are having really good experience with coding and specific knowledge of programming language in which site/software build , then you can do whitebox testing. Also about your second question it is ...


10

Writing unit tests is not difficult - as the saying goes, it is matter of simple programming :-) So if you are competent programmer, and are willing to learn necessary skills and patterns, you can do it as QA engineer. But IMHO (and best practices say that) developers are much better suited to write unit test - because unit tests use internal calls to ...


-1

I think your only choices are either clicking the link or creating a variable to hold a parsed url and then passing that variable to driver.get() I don't know what language you're using but it's super easy to do in Python with the urlparse library.



Top 50 recent answers are included