for (int i=0; i<5; i++){
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
if(i = 4){
driver.findElement(By.id("sb")).sendKeys(Keys.ENTER);}}
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
in ruby I would do
5.times { driver.find_element(id: "sb").send_keys(:arrow_down) }
On Thu, Jul 12, 2012 at 6:10 AM, Nagaraju <nag...@gmail.com> wrote:
Hi All,
I am using web driver to select a value from auto suggestion.
I want to select the 5th suggestion.
i am using
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ENTER);
But i don't want to use arrow_down 5 times..i read some where we can pass number..Can any one help me?
Thanks,
Raju
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
Does any one know how to do it in Java..?
On 7/12/2012 5:57 PM, Oscar Rieken wrote:
in ruby I would do
5.times { driver.find_element(id: "sb").send_keys(:arrow_down) }
On Thu, Jul 12, 2012 at 6:10 AM, Nagaraju <nag...@gmail.com> wrote:
Hi All,
I am using web driver to select a value from auto suggestion.
I want to select the 5th suggestion.
i am using
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
driver.findElement(By.id("sb")).sendKeys(Keys.ENTER);
But i don't want to use arrow_down 5 times..i read some where we can pass number..Can any one help me?
Thanks,
Raju
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/XmsayW2WX_YJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
void sendKeys(java.lang.CharSequence... keysToSend)
The only way to do this, afaik, is the way I posted it.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/ZlUD3Uuj8yYJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/HkY-sU7l1jYJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/HkY-sU7l1jYJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
How to move course to context menu?
Post a snippet of the DOM containing the element with all the autocomplete options, and I can easily assist you.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4eb397e7-6b0a-47a3-bb5b-f02884ea83c1%40googlegroups.com.
Using Java 8 ....
IntStream.iterate(1, n -> n + 1).limit(4).forEach(number -> driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN));
driver.findElement(By.id("sb")).sendKeys(Keys.ENTER)
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/79049063-00c3-4296-9cd9-e14f48e1b635%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/0hOGu5La1nQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAB9YC5Phxn3ketygv95Mn1S9HO0CuQWUw2f3Zy2e3FKzR%3DedOw%40mail.gmail.com.
--
driver.findElement(By.id("sb")).sendKeys(Keys.ARROW_DOWN);
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/0hOGu5La1nQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/00ef1e55-1f07-42c8-ab31-574209a47fdb%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/DF72877B-85E2-44FD-BA46-7BCF15B29547%40gmail.com.