0

Only two days back i have started working in selenium test using firefox driver and yes!!! your guess is correct im in a fix (dont know its a big or a small as im new to this).

I have been assigned to code Selenium test cases to automate the web application browsing

i am using Eclipse IDE and Application runs in firefox.

In that application we have a textbox where data gets populated.It has been developed using Ajax.

Now i can type on that box, that box displays the result in the list too(just like Google search,OR,just like when you suggest tag to your Questions in stack overflow) but i cant select it and submit.

Tried everything but in vain :(

Waiting for a MASTER to Solve it.

Please reply Thanks with anticipation

This is what i tried:

protected void selectDropdoen() throws Exception {

    String str = "text to select";
    for (int i=0; i<str.length(); i++) {
        Thread.sleep(300);
        driver.findElementById("input_dealer").sendKeys(""+str.charAt(i));

    }
     driver.findElementById("input_dealer").setSelected();
    driver.getKeyboard().pressKey(Keys.ENTER);



}

Can any one please explain using selenium object to call waitForCondition() function. I am using FireFoxDriver object in my program. Thanks

1
  • Show us what you have tried. Post an SSCCE Short Self Contained Correct (Compilable) Example sscce.org. Did you get an exception? Did you fail to find the element you were looking for? What does the DOM look like? You need to help demonstrate where the issue occurs, in order for us to help you solve it. Commented Jul 5, 2011 at 4:13

1 Answer 1

2
protected void selectDropdown() throws Exception {
    String str = "text to select";
    driver.findElement(By.id("input_dealer")).sendKeys(str, Keys.RETURN);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.