Tuesday, August 4, 2015

Dropdown Example


7 comments :

  1. How to handle 2 dropdowns which has same name.

    //I have written code like this, but its select only first dropdown, its not going to 2nd dropdown:

    WebElement rel = driver.findElement(By.name("customerBean.relationCd"));
    if(rel.isDisplayed()){
    Select se = new Select(rel);
    se.selectByIndex(18);
    }


    //Even I tried this code too, but its not working:

    List ref = driver.findElements(By.name("customerBean.relationCd"));
    System.out.println("reference dropdowns " + ref.size());
    ((Select) ref.get(0)).selectByIndex(18);
    ((Select) ref.get(1)).selectByIndex(18);

    ReplyDelete
  2. Your article is very helpful.You can visit my website:fmovies apk

    ReplyDelete
  3. Great article on MongoDB course. Very useful for understanding NoSQL databases and how modern applications manage large-scale data efficiently.mongodb course

    ReplyDelete
  4. Dell boomi training and placement helps learners gain technical expertise while preparing for industry job opportunities. This dell boomi training and placement covers workflow automation, API integration, process design, and deployment methods. Students strengthen their skills through practical projects and assignments. The program prepares learners for Dell Boomi careers.

    ReplyDelete