Hot answers tagged

10

Do you think that time is the problem here? If so try to increase the time you are providing in Thread.sleep(); and see it that works out for you. If its not the time, then did you try to find out what the problem is? Are you getting any error?


4

One way is to use a singleton class like this: public class FirefoxDriverProvider { private static FirefoxDriver instance = null; public static FirefoxDriver getInstance() { if (instance == null) { instance = ... initialize FirefoxDriver here ...; } return instance; } } In your TestNG classes, you can do ...


4

Question yourself if you really need to test on Safari on WINDOWS? Safari on Windows has been discontinued since half 2013. I would say focus on the latest Safari on Mac OS X instead. The chance a windows user installing an old version of Safari is extremely small.


4

IIRC selenium webdriver creates a fresh FF profile each time it's constructed. I found a link about how to set it to a different profile (one where your bookmarks, addons etc. exist) Regarding IE, I imagine profiles with IE more difficult perhaps? Why would you want this though? I can maybe understand why you'd want a particular addon to see how it ...


3

Agreeing on good element and attribute identifiers is essential with web applications. Identifying elements is done by developers, designers and automation programmers. In a traditional waterfall environment with most of the requirements and specifications placed up front you can agree that, for example all elements that will be used, checked, clicked on ...


2

Launching Safari browser is very easy, just you have to add safariDriver jar in your Windows Safari browser. Check after installation whether this icon is displayed or not? If Yes then it will work. Steps- Requirements: Safari Browser installed Selenium WebDriver Now we have to install SafariDriver extension with below steps. Manually install the latest ...


2

Selenium supports various programming languages like Java, Perl, Python, Ruby, C#(.Net) etc. So it's mainly up to you. You should choose the language itself, and not the bindings. If you were to force me to name the language you should use- JAVA. I would have to give you the famous then- Java is a my first choice to start with Selenium(even if it is a bit ...


2

Instead of voting for closing I am going to use your question as an example to how not to ask questions. How are we supposed to know what do you need ? we don't know what the product is, what are the company's future plans for the product or testing, what is the budget and how much time do you have or can spend automating stuff, what's your priorities, how ...


2

Here some points about sikuli I have discovered: Sikuli can not select by 100% text match. So it is extremely difficult to use it in financial applications cause there are not too many different GUI elements, but lots of similar buttons, lists, tables... So how could you select specific string (by its contents) in table with 1000+ rows (only 25 are in a ...


1

What's wrong with Visual Studio Community? It's free, perfect for C# and has the Microsoft UnitTest framework integrated. And if you don't like that one, use NUnit (also free).


1

Using priority to drive order of execution is perfectly fine, but question is why do you want to execute test cases in certain order? As a general rule test case should be atomic and should not be dependent on another test cases. In such case do you worry about order of execution. I rather don't pay much attention to order of execution unless its an explicit ...


1

As I understand you want execution to stop if error occurs, in that case you don't want to inclose your code in try and catch block. Remove try and catch block and add @AfterMethod in your testng class. Once your program errors out it would move move to AfterMethod block or after successful completion of your test. @AfterMethod public void cleanup(){ ...


1

adding Thread.sleep(3000) is not a good way to handle synchronization, rather use implicit wait. driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); Implicit wait allows your browser to wait until element is visible or until time set by you, whichever is earlier.


1

Selenium has bindings for the most common languages (see http://www.seleniumhq.org/download/) so use the one either you know best, and/or the one your development team uses for easier integration in the development cycle and common use of tools.


1

Selenium IDE & firebug can work on any versions (mostly above v-31.0) of Mozilla FF. both are Firefox plugins so they don't affect on any versions. If you are asking about Selenium WebDriver & ff versions then it may differs from version to version & Selenium java jars. but my perspective IDE & firebug can work on any versions of ff.


1

The silence is deafening :-) I have no personal experience with NightWatch, but I do have experience with the quirky nature of JavaScript, and because of that experience prefer Python, especially for big projects. Why you never ever reprogram working code from scratch - with history of failures cause by reprogramming from scratch. So if your company is ...


1

You may use this- Xpath1= //a[contains(.,'Create a Rediffmail account')] OR Xpath2=//a[contains(@href,'details')] OR Xpath3=.//*[@id='toprightinfo']/a[2] Or you try with other Locator types as- LinkText Check I have tried & found 1 match xpath-


1

epubcheck will assess whether your file conforms to the epub standards. It doesn't care about your content or your formatting, as long as it conforms to the epub standards. An epub file mostly a static web site compressed into zip format (plus some additional metadata). So: You could unzip the content in a directory and use Selenium to examine the HTML ...


1

I haven't done this, but since epubcheck has a CLI & java library, you could incorporate the library with WebDriver & do the validation that way. The wiki has an example of how to use it as a library.


1

Yes absolutely right. Because all those bookmarks, addons, passwords etc.. are saved In your regular browser's profile folder so when you launch browser manually, It will use existing profile settings & It will show you all those stuffs. But when you run your software web application's tests In selenium webdriver, It Is opening new browser ...


1

After working on this for a few hours with a colleague and doing some in-browser debugging in Safari we came to the following conclusion: The element was not visible ('below the fold') and Safari was not able to find the element to then click on. The solution was to scroll to the area of the page where the element existed by finding a nearby element ...


1

You cannot do that with just Selenium, as @Peter-Masiar mentioned, but you can look at the Structural Similarity method. Additional link. My company has been using this method quite a lot for testing.


1

To switch between windows there are multiple ways to do it. This is what we are using: public void switchToNewWindow(int windowNumber) { Set < String > s = driver.getWindowHandles(); Iterator < String > ite = s.iterator(); int i = 1; while (ite.hasNext() && i < 10) { String popupHandle = ...



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