selenium webdriver commands
Quality,  Selenium,  Webdriver

Selenium Webdriver Commands

Selenium Webdriver Commands

There are many selenium webdriver commands use to automate a project as we have seen in my previous posts of selenium webdriver. Some of the available commands in webdriver are Browser Commands, Interactive Commands, Information Commands, String Comparison Commands, Validation Commands etc.

Browser Commands:

The browser commands use to open the browser, close the browser and open the website by get the url.

get :- It is to open the URL of the web application.

    Syntax: driver.get(“url”);

quit():- It is to close the browser.

    Syntax: driver.quit();

close:- It is to close the child or pop up window.

Syntax: driver.close();

 

Interactive Commands:

The interactive commands use to interact with the web application like, enter values in the textbox, clear the values from the text box, click any button, check box or radio button, select the values from the dropdown.

sendkeys:- It is to enter some value in the text box.

Syntax: driver. findelement (By.name (“username”)). sendkeys(“name1”);

clear:- It is to clear the data from the text box.

Syntax: driver. findelement (By.name (“username”)). clear();

click:- By using this command we can clink on a button, radio button, checkbox, image and link.

Syntax: driver. findelement (By.name (“button1”)). click();

newSelect:- It is to select a value from a dropdown and a list box.

Syntax: new Select(driver.findElement(By.id(“continents”))).selectByVisibleText(“Australia”);

 

Information Commands:

The information commands use to extract the information within the tags, outside the tags or dropdowns etc. from the applications.

getText():- It is to take the information from the application which is available outside of the tags.

getAttribute():- It is to take the information from the application which is available in between the tags.

getOptions():-It is to take the information from the application which is available within a dropdown and a list box.

 

String Comparison Commands:

We can compare the strings with another string by using the below commands.

equals:- It is to compare the string with another object where it is case sensitive.

equalsIgnoreCase:- It is also to compare with another string but it is not case sensitive.

Contains:- It is to check that whether the sequence of characters are available in string or not.

 

Validation Commands:

The validation commands use to validate the element availability, enable, disable and select the check boxes etc.

isDisplayed():- It is to check whether the element is available or not.

isEnabled():- It is to check whether the element is enabled or disabled.

isSelected():- It is to validate whether the radio button or check box is selected or not.

 

Please click here to read Automation Script Implementation

31 Comments

  • Munish Garg

    WebDriver is an extended version to Selenium RC with surplus advantages and it overcomes many of its limitations. Selenium WebDriver permits you to run your tests against diverse browsers, not just Firefox WebDriver also enables you to use a programming language in creating your test Following programming languages are supported by WebDriver are Java, .Net, PHP, Python, Perl, Ruby.

    Well thanks for sharing these helpful commands!

  • golden goose outlet

    Thanks so much for giving everyone an extraordinarily brilliant opportunity to read critical reviews from this site. It can be so superb plus packed with a good time for me and my office peers to search the blog at least three times a week to find out the newest issues you have got. And definitely, I am just always satisfied with all the sensational principles you give. Some 4 areas in this post are unequivocally the very best we have had.

  • yeezy shoes

    I wanted to write you the little word in order to give thanks once again with your splendid ideas you’ve featured on this website. This is really surprisingly generous of you to make extensively what exactly a few people would have marketed as an e-book to end up making some profit on their own, precisely since you could have done it in the event you decided. Those ideas also served as the fantastic way to realize that some people have the same eagerness really like mine to know significantly more in terms of this matter. I believe there are some more fun sessions in the future for individuals who view your blog post.

  • adidas yeezy

    I would like to express my respect for your generosity supporting folks that require help on your issue. Your personal commitment to getting the solution around ended up being pretty powerful and have empowered people much like me to attain their objectives. Your personal warm and friendly guidelines means this much to me and substantially more to my office colleagues. Many thanks; from all of us.

  • curry 7

    I am just writing to make you know what a cool discovery my child had visiting your webblog. She even learned plenty of details, which include what it’s like to possess an ideal coaching mindset to make others with no trouble completely grasp a variety of advanced things. You undoubtedly did more than our expected results. Thank you for coming up with the productive, trusted, explanatory and even cool tips on that topic to Sandra.

  • supreme clothing

    I wanted to send you a little observation to thank you so much again for your awesome techniques you’ve discussed on this website. It was so particularly open-handed of you to provide openly what exactly most people might have supplied as an e book to earn some money for their own end, precisely considering that you could have done it if you ever decided. Those guidelines also acted to be a great way to comprehend some people have the identical keenness the same as my very own to learn a good deal more in terms of this issue. I think there are millions of more pleasant situations ahead for those who see your website.

  • golden goose outlet

    I’m just commenting to let you understand of the fine encounter my friend’s princess undergone reading your webblog. She mastered some details, including how it is like to have a great teaching spirit to let the mediocre ones without hassle know just exactly specific extremely tough issues. You truly did more than my desires. Thank you for providing those powerful, trustworthy, explanatory as well as fun guidance on the topic to Tanya.

  • jordan retro

    I enjoy you because of every one of your effort on this site. My mother takes pleasure in carrying out investigation and it is simple to grasp why. Almost all know all about the compelling tactic you create powerful tactics through your blog and as well as foster participation from some other people on the issue so our simple princess is undoubtedly understanding a great deal. Take pleasure in the remaining portion of the new year. You’re carrying out a really good job.

  • lebron 15 shoes

    My spouse and i ended up being really fortunate Michael managed to complete his investigations through the ideas he gained through your web site. It is now and again perplexing to simply always be offering tips and tricks some others have been making money from. Therefore we already know we now have the blog owner to appreciate because of that. The specific explanations you’ve made, the easy web site navigation, the relationships you make it easier to foster – it is many amazing, and it’s really letting our son in addition to the family imagine that the subject is cool, which is certainly especially important. Thanks for the whole lot!

  • kd 10

    I and my pals ended up taking note of the nice techniques on the website and so the sudden developed a horrible suspicion I never expressed respect to the blog owner for those techniques. My guys came as a result glad to read through all of them and already have pretty much been tapping into these things. Appreciate your truly being simply accommodating and also for figuring out this form of superb issues millions of individuals are really desperate to discover. Our honest apologies for not expressing gratitude to you sooner.

  • golden goose

    I precisely wanted to thank you very much again. I do not know what I would have worked on without those techniques shared by you over such industry. Completely was a very hard dilemma in my position, however , understanding a professional avenue you treated the issue took me to cry over contentment. I’m just happy for the advice and thus sincerely hope you recognize what a powerful job you are always providing instructing people through your websites. More than likely you have never encountered all of us.

  • calvin klein outlet

    This is the fitting weblog for anyone who needs to seek out out about this topic. You notice so much its almost arduous to argue with you (not that I actually would need匟aHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, just nice!

  • jordan shoes

    After study a number of of the weblog posts in your website now, and I actually like your way of blogging. I bookmarked it to my bookmark web site list and shall be checking again soon. Pls take a look at my web page as effectively and let me know what you think.

  • goyard

    Nice post. I learn one thing tougher on different blogs everyday. It can all the time be stimulating to learn content from other writers and practice a little something from their store. I抎 favor to make use of some with the content material on my weblog whether or not you don抰 mind. Natually I抣l give you a hyperlink on your net blog. Thanks for sharing.

  • amazon pay advertising

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why waste your intelligence on just posting videos to your blog when you could be giving us something informative to read?

  • Doloris

    I was suggested this blog by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my trouble. You’re wonderful! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

LinkedIn
Share
Instagram
Follow by Email
RSS