Wednesday 4 September 2013

Keys in Selenium script | Webdriver

Key combinations made easier through Actions. Some of the popular keys were illustrated in this section; Similar key functions can be used for other keys from the image.

Enter/Return
driver.findElement(By.id("Value")).sendKeys(Keys.RETURN);
or|
driver.findElement(By.id("Value")).sendKeys(Keys.ENTER);

#PYTHON
from selenium.webdriver.common.keys import Keys
driver.find_element_by_name("Value").send_keys(Keys.RETURN)
or|
element = driver.find_element_by_id("Value")
element.send_keys("keysToSend")
element.submit()

#RUBY
element = @driver.find_element(:name, "Value")
element.send_keys "keysToSend"
element.submit
or|
element = @driver.find_element(:name, "Value")
element.send_keys "keysToSend"
element.send_keys:return


Down Arrow
driver.findElement(By.id("Value")).sendKeys(Keys.ARROW_DOWN);


TAB
Actions action =new Actions(driver);
action.sendKeys(Keys.TAB).sendKeys("keysToSend");
action.build().perform();

#PYTHON
driver.find_element_by_name("Value").send_keys(Keys.TAB)


Ctrl+End | Scroll to Bottom of the page
Actions actions = new Actions(driver);
actions.keyDown(Keys.CONTROL).sendKeys(Keys.END).perform();


Backspace
Actions actions = new Actions(driver);
actions.sendKeys(Keys.BACK_SPACE).perform();

#PYTHON
driver.find_element_by_name("Value").send_keys(Keys.BACKSPACE)
or|
driver.find_element_by_name("Value").send_keys(Keys.BACK_SPACE)




#PYTHON




34 comments:

  1. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

    ReplyDelete
  2. Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me.


    java training in chennai | java training in bangalore

    java online training | java training in pune

    selenium training in chennai

    selenium training in bangalore

    ReplyDelete
  3. All the points you described so beautiful. Every time i read your i blog and i am so surprised that how you can write so well.
    python training institute in chennai
    python training in Bangalore
    python training in pune
    python online training

    ReplyDelete
  4. Well you use a hard way for publishing, you could find much easier one!
    AWS Training in chennai
    AWS Training in bangalore

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Well done! Pleasant post! This truly helps me to discover the solutions for my inquiry. Trusting, that you will keep posting articles having heaps of valuable data. You're the best! 
    Blueprism training in tambaram

    Blueprism training in annanagar

    Blueprism training in velachery

    ReplyDelete
  7. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Data science training in tambaram | Data Science training in anna nagar
    Data Science training in chennai | Data science training in Bangalore
    Data Science training in marathahalli | Data Science training in btm

    ReplyDelete
  8. I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks

    Data Science course in Chennai
    Data science course in bangalore
    Data science course in pune

    ReplyDelete
  9. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.


    AWS Training in Rajaji Nagar | Amazon Web Services Training in Rajaji Nagar


    Amazon Web Services Training in Pune | Best AWS Training in Pune

    AWS Online Training | Online AWS Certification Course - Gangboard

    ReplyDelete
  10. Really great post, I simply unearthed your site and needed to say that I have truly appreciated perusing your blog entries. I want to say thanks for great sharing.
    python training in chennai
    python training in Bangalore
    Python training institute in chennai

    ReplyDelete
  11. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.

    java training in chennai | java training in bangalore

    java online training | java training in pune

    ReplyDelete
  12. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.

    Devops Training in pune
    DevOps online Training

    ReplyDelete
  13. Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..
    iphone service center | ipad service center | imac service center

    ReplyDelete
  14. Were a gaggle of volunteers as well as starting off a brand new gumption within a community. Your blog furnished us precious details to be effective on. You've got completed any amazing work!
    python Training institute in Pune
    python Training institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  15. Very well written blog and I always love to read blogs like these because they offer very good information to readers with very less amount of words....thanks for sharing your info with us and keep sharing.

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  16. Get Big Data Certification in Chennai for making your career as a shining sun with Infycle Technologies. Infycle Technologies is the best Big Data training institute in Chennai, providing complete hands-on practical training of professional specialists in the field. In addition to that, it also offers numerous programming language tutors in the software industry such as Oracle, Java, Python, AWS, Hadoop, etc. Once after the training, interviews will be arranged for the candidates, so that, they can set their career without any struggle. Of all that, 200% placement assurance will be given here. To have the best career, call 7502633633 to Infycle Technologies and grab a free demo to know more.Grab Big Data Certification in Chennai | Infycle Technologies

    ReplyDelete
  17. Finish the Selenium Training in Chennai from Infycle Technologies, the best software training institute in Chennai which is providing professional software courses such as Data Science, Artificial Intelligence, Java, Hadoop, Big Data, Android, and iOS Development, Oracle, etc with 100% hands-on practical training. Dial 7502633633 to get more info and a free demo and to grab the certification for having a peak rise in your career.

    ReplyDelete
  18. This post is so interactive and informative.keep update more information...
    Types of Oracle Database Users
    Different Types of Oracle Database Users

    ReplyDelete
  19. Infycle Technologies, the top software training institute and placement center in Chennai offers the best
    Data science training in Chennai
    for freshers, students, and tech professionals at the best offers. In addition to Digital Marketing, other in-demand courses such as DevOps, Big Data, Cyber Security, Python, Selenium, Big Data, Java, Power BI, Oracle will also be trained with 100% practical classes. Call 7504633633 to get more info and a free demo.

    ReplyDelete
  20. Seleniumworks: Keys In Selenium Script >>>>> Download Now

    >>>>> Download Full

    Seleniumworks: Keys In Selenium Script >>>>> Download LINK

    >>>>> Download Now

    Seleniumworks: Keys In Selenium Script >>>>> Download Full

    >>>>> Download LINK ve

    ReplyDelete
  21. Seleniumworks: Keys In Selenium Script >>>>> Download Now

    >>>>> Download Full

    Seleniumworks: Keys In Selenium Script >>>>> Download LINK

    >>>>> Download Now

    Seleniumworks: Keys In Selenium Script >>>>> Download Full

    >>>>> Download LINK OJ

    ReplyDelete