New answers tagged

0

Might be xpath of save button gets changed after first submission, try to shorten your xpath and eliminate unwanted div tag if any, try using following xpath //input[@value='Save']


-1

For Windows I recommend AutoIt You can either record interaction with UI elements or directly write automation scripts with their Basic-like scripting language.


0

driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); is the correct and cleanest way of doing this in my experience. Call it once after instantiating the driver, and all subsequent calls will correctly wait for whatever timespan specified (60 seconds in this case) It is better to be generous in timeframes for explicit waits, as lower ...


0

Thanks for your quick reply on this. The issue is that the form has one iframe. Before saving the complete form I did not switch to the default content from child to parent so elements were not able to be picked up by selenium api.


0

The Grinder is a free Java-based load-testing framework available under a BSD-style open-source license. It was developed by Paco Gomez and is maintained by Philip Aston. Over the years, the community has also contributed many improvements, fixes, and translations. The Grinder consists of: The Grinder Console - This GUI application controls various Grinder ...


0

By doing some heavy research, I was able to find the solution by using: wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.finder)); The key was to find all the elements present in the part where i was going to validate if it was available. This solved the Time out's error: As for the Element is no longer attached to the DOM, and the ...


2

I think the answer to your question depends on what the exception text string is going to be used for. Is it part of the documented interface for that class? If some other part of the program is going to use it (say to pass that error message back to the person entering the data), and/or it's part of the documented interface, then you absolutely need to ...


0

use implicit wait to handle all kind of sync issues. driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); user this at the time of declaring the web driver object; like: WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.get("http://somedomain/url_that_delays_loading"); WebElement ...


0

There are 2 possibilities what is going on: some call of selenium functions will time out (click, type, etc.) after some time because the object is not there at all. even if you will enable the wait.until, this has its own timeout (could be 30 sec.) in selenium. Case 1) is solved by enabling waits before some click or other action should happen. To ...


0

We use getAttribute("title"); to get the tooltip text of a webelement. In this please make sure that the webelement is not inside another iframe. I found one more thing from the html snapshot you provided. That is the element is having an attribute called "title", whose value is "" (Empty string). So probably you will get printed the empty string. If the ...


-1

ok but, i was talking about using page factory, and methods from page classes which i later use in main class - test class


2

As I understood the question, it is required to define the reusable methods and use those methods in different test cases based on the requirement. Here I am writing the code for two individual methods to work with,... public void inputKeys(WebElement we,String ip){ we.sendKeys(ip); } The above code just type the string value referred by ip variable. ...


0

Since they have already given you the test scenario and have told you what they want asserting ("verify that total price matches"), it looks like they really just want to see your coding style and how you would design the DSL for this scenario. I think the way you have split up the packages sounds sensible. Not sure what they want specifically but if it ...


1

Certifications don't teach testing. Still if you want to go for one, well, there are several available out there. But, they don't teach you how to test, they mostly teach only a certain terminologies. Yes, learning a programming language is an added advantage for a tester, especially for someone who is looking to make a career in automation testing or ...


1

The question and the description that you have written for it are misleading. I'm assuming you want to know which certifications will help you get a start for your career in Software Testing. Well for that I don't think you need to go for any certifications. Read good blogs and article on testing. There are thousands of them available on the internet. ...


10

I don't know whether a certification is necessary for automation testing, but you definitely require good coding skills and logic development skills for it. Its advantageous to learn Java as its open source and hence there are countless forums and communities to seek kelp. Plus many of the automation testing tools (specially open source testing tools) use ...


1

Python is widely considered as best language for beginner programmers. Java puts more focus on generating fast code (which adds requirements on programmer). Python is substantially more forgiving, and for website testing, speed is not the first requirement (flexibility is, where Python shines). Also, if you want to be programmer, you need to improve your ...


1

Actually java or other languages could be good option to drive Selenium tests, but it is not a must. You can command WebDriver from many different languages. Ruby, java, C#, VBA, VBS, javascript. Thanx to WebDriver you will have possibility to run your tests in multiple browsers (Chrome, Firefox, IE, Safari...). But all the languages are just a plus. If ...


0

There are several ways to get involved with software testing: On way is to get formal qualification like a ISTQB certificate Another way is to just start testing on sites like https://test.io/ to gain experience in testing products and writing bug reports When You apply for a job in a software company it is always a good thing to know the very basics ...


0

There is no programming language called Android. Android is an OS and that as well is developed with Java(I Guess). You can learn and use Selendroid using Java. For Java you will get a lot of help from the countless communities and forums on the internet and is completely open source. Since you are already using Selenium Webdriver with Java, I guess it'll ...


2

Probably the elements you are looking for a updated at a later point in time. First the page is downloaded, then rendered and then the JavaScript is run. The element has not yet been created by the JavaScript. Maybe HTMLUnit does not process the JavaScript correctly. HTMLUnit is not know for its JavaScript implementation. Its primary usage is unit-testing ...


0

Try to apply a little wait for the page to load and then try and locate your element. This is just to be sure that your code didn't execute while the page was still being loaded. Try something like below, WebDriver driver = new HtmlUnitDriver(true); driver.get("https://www.google.co.in/"); Thread.sleep(5000); WebElement e =driver.findElement(By.xpath(".//* ...


0

You can use . to represent a relative path in your directory So, if you used something like classpathRoot, "../pictures" For more details check here. http://docs.oracle.com/javase/7/docs/api/java/io/File.html http://docs.oracle.com/javase/tutorial/essential/io/pathOps.html



Top 50 recent answers are included