Tag Info

New answers tagged

0

Thanks for your responses finally I solved it cutting out some plugins and blocked some third party ads before starting the tests. Solution 1: There are some plugins like flash player which may hangs the browser inconsistently waiting for some resource during test run, try disabling such plugins while starting the test using the chrome switches. ...


1

Approach 1 Create a class, for example Hull. In the cass is a protected variable WebDriver driver. In the class is a method setup() with a @Before annotation. In the method you has a condition: Is WebDriver null, initialize; else do nothing. Classes with test cases extends from Hull. Classes with test cases can use the variable driver. Approach 2 ...


-1

This post could help you out: http://www.softwaretestingclub.com/profiles/blogs/selenium-2-0-webdriver-how-to-configure-selenium-webdriver-in


1

Please add your HTML code properly so we can look into this. Please go through the below links. Select option Selenium2Library


1

It sounds like the majority of your issue is in creating the connection to your Database. However, you lack to mention the type of database so I will try and cover some of the more popular ones. Oracle Tutorial or SO Question SQL Server JTDS I could list all of the types of databases for years so here is a list of database related tutorials. If you need ...


1

Like Josa Pita says, that is nothing for testing frameworks itself. The developers could write a script to save the current version of the DB. The process should look like that: Save current version of DB/any kind of data storage. Start test run. After test run finished restore the saved version of the DB/any kind of data storage. But I think it is ...


0

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? Since this is in Java, yes it is possible to interact with SoapUI using the test runner or by importing SoapUI into Java and running it as a background task. If two different frameworks are integrated, whether this is ...


0

From what I understand from your question, you want to delete the records of the actions you made on your app? This has nothing to do with selenium or testng, you need to have an app for tests only, with a clean DB, that you can delete the records from your actions. Is this helpful?


0

TestNG provide a lot of annotations for thinks like that: @BeforeTest, @BeforeSuite, BeforeGroups and more: http://testng.org/doc/documentation-main.html#annotations It may be look like that: @BeforeTest public void setup() { // open your popup and click on the link } @Test public void test() { // test case } @AfterTest public void tearDown() { ...


4

You can use the findElements method to find all TD tags that match your criteria, and then getText method to retrieve each element's value. The latter will be returned as a String, so you may need to convert it to a number before comparing it. Since the sorted elements have a special class, you may want to use a CSS selector with findElements.


0

It looks like this issue has been logged as a bug for Selenium but has not yet been fixed: https://code.google.com/p/chromedriver/issues/detail?id=402 They are looking for a specific repro, maybe you could help them out by posting your specific repro? One person reported that removing any driver timeout options from their code solved the problem: ...


0

The getWindowHandle() function returns the current window, I think you cannot switch to the current window. You want to use getWindowHandles() to find other windows. For an example and similar issue see: http://stackoverflow.com/questions/19112209/how-to-handle-the-new-window-in-selenium-webdriver


3

The actual slider is a link-element you should be able to define a css selector based on its classes. <a class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a> The first you find is the left slider, the second the right slider. I have successfully used use the Action Builder and the MoveToOffsetAction to drag a slider X number ...


0

You should develop your test cases before you automate them. In this case, if you don't know the limit, you should check the requirements, check the spec, or ask a developer what the limit was intended to be. Otherwise, how would you know the limit you found was the one that was meant to be there? Worst case, you can check it manually by typing until you ...


0

Try the following, it should work: $this->element($this->using('css selector')->value('*[class="sideNav"]')); instead of $this->byClassName('sideNav');


0

To verify that slider content can be changed manually, the following solution can be used: WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/a")); Actions builder = new Actions(driver); action.click(slider).sendKeys(Keys.ARROW_RIGHT).perform(); And then check that text or image has changed.


0

Here is some pseudo code to find the max-length of an input field. After a form submit you can check the database indeed saved the data correctly. function maxLength(input) { while ( current != length ) { current = input.value.length() value = input.value input.clear input.sendKeys(value + randomNewChar()) length = ...


1

It depends on implementation of input field. 1) All major browsers support maxlength attribute. Look at source code of the page and verify if the input field has it. Desciption and example: http://www.w3schools.com/tags/att_input_maxlength.asp 2) Or you can enter very long text in the field and see what happens. To generate very long string you ...


0

This is what I'd do: Insert a stupidly big number of characters (1000 for example) Click somewhere else in order to remove the focus from the input field (to let the app process, at least this is how our app works) Check the number of characters still in the input field, this way you'll now the max number. Now, this is probably not the right approach, ...


1

I have seen this error in other WebDriver projects, and my experience suggests that the URL you're passing as the first parameter to the RemoteWebDriver constructor is not a valid RemoteWebDriver grid URL. Double-check to ensure that the WebDriver grid server is running, and that the URL is valid for the server. For example, my RemoteWebDriver URLs look ...



Top 50 recent answers are included