Thursday, April 18, 2013

Handling Ajax dropdown - Webdriver



Below code types the value in the given dropdown   

  public void Dropdown1(String eleproperty, String value) {
            WebElement element = driver.findElement(By.id(eleproperty));
            if (element.isEnabled()) {
                  element.sendKeys(value);
                  Sleep();

            } else {
                  System.out.println("object is disable");
            }

            String actval = driver.findElement(By.id(eleproperty)).getAttribute("value");
            if (value.equals(actval)) {
                  System.out.println(actval);
            }
      }

Contributed by: Ch. Suma

AI in Software Testing: How Artificial Intelligence Is Transforming QA

For years, software testing has lived under pressure: more features, faster releases, fewer bugs, smaller teams. Traditional QA has done her...