Different Way of Click in Selenium WebDriver


 /*    Click on Element using Actions class's click method*/
 public void actionClick(String xpathValue) throws NoSuchElementException, Exception
 {
  WebElement element = driver.findElement(By.xpath(xpathValue));
  new Actions(driver).moveToElement(element).click().build().perform();
 }

 /*    Click on Element */
 public void clickMethod(String xpathValue) throws NoSuchElementException, Exception {
  WebElement element = driver.findElement(By.xpath(xpathValue));
  element.click();
 }

 /*    Click on Element using JavascriptExecutor class's click method (Using JavaScript)*/
 public void javaScriptClick(String xpathValue) throws NoSuchElementException, Exception {
  WebElement element = driver.findElement(By.xpath(xpathValue));
  JavascriptExecutor js = (JavascriptExecutor) driver;
  js.executeScript("arguments[0].click();", element);
 }

 /*    Perform Mouser Hover on Element and Click on other  Element*/
 public  void mouseHoverAndClick(WebElement elementToHover,WebElement elementToClick) {
  Actions action = new Actions(driver);
  action.moveToElement(elementToHover).click(elementToClick).build().perform();
 }

 /* Perform Mouser Hover on Element */
 public void mouseHover(WebDriver driver, WebElement element) {
  Actions action = new Actions(driver);
  action.moveToElement(element).perform();
 }

/* Perform Double Click on Element*/
     public void mouseHover (WebElement element) {                                                               
     Actions action = new Actions(driver).doubleClick(element);                               
     action.build().perform();
 }



Post a Comment

40 Comments

  1. i've examine your weblog its very appealing and amazing. i like your weblog.

    ReplyDelete
  2. At Coepd - (Center of Excellence for Professional Development) Manual & Selenium testing training program is designed to give participants the skills & knowledge to gain a competitive advantage in starting/enhancing a career in software testing. We provide the attendee's software testing service which is required to ensure that tested applications meet all application requirements. Participants receive up-to-date training in multiple areas in Software Testing and a thorough understanding of real-world projects.

    http://www.coepd.com/TestingTraining.aspx

    ReplyDelete
  3. Nice blog,good information about Selenium.Fore more details to check our website.
    Selenium Training in Hyderabad

    ReplyDelete
  4. Thanks for you sharing to spread out your knowledgeSelenium

    Training in Chennai

    ReplyDelete
  5. Thank you for your information. It very nice article.
    Selenium Training in Pune

    ReplyDelete
  6. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    Selenium training in electronic city

    ReplyDelete
  7. Tech Gadgets reviews and latest Tech and Gadgets news updates, trends, explore the facts, research, and analysis covering the digital world.
    You will see Some Tech reviews below,

    lg bluetooth headset : You will also wish to keep design and assorted features in mind. The most essential part of the design here is the buttonsof lg bluetooth headset .

    Fastest Car in the World : is a lot more than the usual number. Nevertheless, non-enthusiasts and fans alike can’t resist the impulse to brag or estimate according to specifications. Fastest Car in the World click here to know more.

    samsung galaxy gear : Samsung will undoubtedly put a great deal of time and even more cash into courting developers It is looking for partners and will allow developers to try out
    different sensors and software. It is preparing two variants as they launched last year. samsung galaxy gear is very use full click to know more.

    samsung fridge : Samsung plans to supply family-oriented applications like health care programs and digital picture frames along with games It should stick with what they know and they
    do not know how to produce a quality refrigerator that is worth what we paid. samsung fridge is very usefull and nice product. clickcamera best for travel: Nikon D850: Camera It may be costly, but if you’re trying to find the very best camera you can purchase at this time, then Nikon’s gorgeous DX50 DSLR will
    probably mark each box. The packaging is in a vibrant 45.4-megapixel full-frame detector, the picture quality is simply wonderful. However, this is just half the story. Because of a complex 153-point AF system along with a brst rate of 9 frames per minute. camera best specification. click here to know more.

    visit https://techgadgets.expert/ this site to know more.

    ReplyDelete
  8. PhenQ Reviews 2019 – WHAT IS PhenQ ?


    How to use PhenQ ?This is a powerful slimming formula made by combining the multiple weight loss
    benefits of variousPhenQ ingredients. All these are conveniently contained in
    one pill. It helps you get the kind of body that you need. The ingredients of
    the pill are from natural sources so you don’t have to worry much about the side
    effects that come with other types of dieting pills.Is_PhenQ_safe ? yes this is completly safe.
    Where to buy PhenQ ? you can order online.PhenQ Scam ? this medicine is not scam at all.


    Watch this PhenQ Reviews to know more.
    Know about PhenQ Scam from here.
    know Is PhenQ safe for health.
    you don`t know How to use PhenQ check this site

    wanna buy phenq check this site and know Where to buyPhenQ and how to use.

    check the PhenQ ingredients to know more.

    what is PhenQ check this site.

    ReplyDelete
  9. Weed Supermarket.
    Cannabis oil for sale, buy cannabis oil online, where to buy cannabis oil, cannabis oil for sale, buy cannabis oil online,
    cannabis oil for sale UK, cannabis oil for sale, where to buy cannabis oil UKBuy cbd oil, buying marijuana edibles online legal,
    online marijuana sales, buy cbd oil UK, best cbd oil UK, cheap cbd oil UK, pure thc for sale, cbd oil wholesale UK, cbd oil online buy UK
    Cbd flower for sale uk, cbd buds wholesale uk, cbd flower for sale uk, buy hemp buds uk, cheap cbd, flower uk, buy cbd buds online uk,
    cbd flowers buds uk, cbd buds for sale, cbd buds for sale uk, hemp, buds for sale uk, cbd flower for sale uk, high cbd hemp buds,
    cbd buds uk for sale, cbd buds online buy uk, hemp flowers wholesale uk, cheapest cbd flowers ukMarijuana weeds, buy marijuana weed online,
    marijuana weed in UK, marijuana weed for sale, where to order marijuana weed, cheap marijuana weed online, best quality marijuana weed,
    how to buy marijuana weed, marijuana hash, buy marijuana hash online, marijuana hash for sale, where to buy marijuana hash, buy marijuana hash online UK,
    buy marijuana hash in Germany, buy marijuana hash in Belgium, top quality marijuana hash, mail order marijuana hash, cheap marijuana hash
    You can buy Weed, Cannabis, Vape Pens & Cartridges, THC Oil Cartridges, Marijuana Seeds Online in the UK, Germany, France, Italy, Switzerland,
    Netherlands, Poland, Greece, Austria, Ukraine. We deliver fast using next Day Delivery.
    THC vape oil for sale, dank vapes for sale, buy dank vapes online, mario cartridges for sale, weed vape, thc vape, cannabis vape, weed vape oil,
    buy vape pen online, buy afghan kush online, blue dream for sale, marijuana edibles,

    Visit here https://www.dankrevolutionstore.com/ to know more.

    ReplyDelete
  10. Big Truck Tow: Heavy Duty towing service san jose
    We're rated the most reliable heavy duty towing san jose service & roadside assistance in San Jose!
    Call us now! We're ready to help you NOW!

    Since 1999, tow truck san jose has provided quality services to clients by providing them
    with the professional care they deserve. We are a professional and affordable Commercial
    Towing Company. BIG TRUCK TOW provides a variety of services, look below for the list of
    services we offer. Get in touch today to learn more about our heavy duty towing


    Click here to Find tow truck near me

    ReplyDelete
  11. Keto Pills The Fastest Way to Get Into Ketosis?
    Keto diet pills reviews to let you know how to get into ketosis fast and feel
    young & energetic. These keto diet pills work wonders when taken as advised.
    Read This Informative article from top to bottom about Best Keto diet pills reviews & See
    Keto pills can help you to get into ketogenesis quickly and enjoy life-long benefits of
    maintaining healthy weight.our amazing Keto Diet Pills Recommendation at the end!
    How to get into ketogenesis ?
    If you Don’t know Where to buy keto diet pills click here.
    To Know More Information Click https://ketodietpillsinfo.com/ here.

    ReplyDelete
  12. http://blog.agupieware.com/2016/06/setting-sail-for-stars-elon-musks.html?showComment=1571562148499#c4435997541308686095

    ReplyDelete
  13. Ez battery reconditioning reviews - You can now easily revive your old batteries with this
    Ez battery reconditioning pdf which provides step by step instructions for reconditiong a battery.
    Ez battery reconditioning blog publishes how ez battery reconditioning reviews programs works
    and where buy ez recondition battery step by step program online after this candid
    Ez battery reconditioning reviews. ez reconditioning batteries is newbie friendly.
    It may help you set up and run your own battery reconditioning business by learning this skill at home.


    How to recondition a battery with Ez battery reconditioning .
    Have you heard about Tom Ericson's Ez battery reconditioning reviews technique and
    are wondering whether it is possible or not.

    visit https://ezbatteryreconditioninginfo.com/ this site to know more. Thank you every one.

    ReplyDelete
  14. This short description of CTFO gives you some idea of what the company does: ---
    Changing The Future Outcome also known as CTFO is a reputable (MLM) multi level marketing business in the CBD Oil niche. The primary reason behind their fast growth is that they provide some of the best CBD products in the marketplace. They also provide the products at a low cost for their associates and consumers. Considering that the CBD niche is growing faster and faster every year, it's easy to see why the CTFO network marketing company is growing so fast.CTFO work from home

    ReplyDelete
  15. Das Team von Versicherungsmakler Kassel verbindet diedigitalen Vorteile der Onlinewelt mit der persönlichen Beratung beim Kunden, so
    wie Sie es bis jetzt kennen in Kassel und der Umgebung.Für die Beratung werden sehr umfangreiche Softwareprogrammefür die Ausarbeitung der Ziele und Wünsche unserer Kunden eingesetzt. Diese
    Ausarbeitungen werden in persönlichen Beratungsterminen besprochen. Vorab
    werden die Wünsche und die Bedürfnisse der Kunden besprochen.Mit einer großen Auswahl von Berufsunfähigkeits Versicherungwerden Ihre individuelle Situation in der Beratung berücksichtigt. Sie können sich gegen mit Berufsunfähigkeit, der SchwerenKrankheiten Versicherung und gegen:Krebs, Schlaganfall, Demenz, Alzheimer, Multiple Sklerose Gutartiger Gehirntumor,
    Gutartiger Rückenmarkstumor, Herzinfarkt, Bypass-Operation am Herzen,
    Erkrankung des Herzmuskels (Kardiomyopathie), Herzstillstand, Operation zur
    Korrektur eines Herzfehlers, Ersatz oder Korrektur einer Herzklappe,
    Erkrankungen und Schädigungen des zentralen Nervensystems, Kinderlähmung /
    Polio absichern.Wir sind die Experten für die Schwere KrankheitenVersicherung in Kassel und der Umgebung. Das Team von Versicherungsmakler KasselEnglisch:The team ofinsurance brokers Kassel combines the digital advantages of the online world
    with personal advice to customers, as you know it up to now in Kassel and the
    surrounding area.For theconsultation very extensive software programs are used for the elaboration of
    the goals and wishes of our customers. These elaborations are discussed in
    personal consultation appointments.You can takeout insurance against occupational disability, serious illnesses and against:
    cancer, stroke, dementia, Alzheimer's, multiple sclerosis, benign brain tumor,
    benign spinal cord tumor, heart attack, bypass surgery on the heart, disease of
    the heart muscle (cardiomyopathy), cardiac arrest, surgery to correct a heart
    defect Secure, replace or correct a heart valve, diseases and damage to the
    central nervous system, polio.We are expertsin serious illness insurance in Kassel and the surrounding area.Schwere Krankheiten Versicherung Kassel

    ReplyDelete
  16. This High Temperature Aging Chamber is widely applied for automotive parts ,electronic and electric products ,components and materials by constant high temperature reliability test.High Temperature Aging Environmental Test Chamber

    ReplyDelete
  17. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page! click here

    ReplyDelete
  18. ترفند برد و آموزش بازی انفجار آنلاین و شرطی، نیترو بهترین و پرمخاطب ‌ترین سایت انفجار ایرانی، نحوه برد و واقعیت ربات ها و هک بازی انجار در
    اینجا بخوانید
    کازینو آنلاین نیترو
    بازی حکم آنلاین نیترو
    بازی حکم آنلاین
    Introducing the Nitro Blast game site
    معرفی سایت بازی انفجار نیترو
    همان طور که می دانید بازی های کازینو های امروزه از محبوبیت ویژه ای برخودارند که این محبوبیت را مدیون سایت های شرط می باشند. با گسترش اینترنت این بازی ها محدودیت های مکانی و زمانی را پشت سرگذاشته و به صورت آنلاین درآمده اند.
    بازی انفجار نیترو
    بازی انفجار
    یکی از محبوب ترین بازی های کازینو، بازی انفجار می باشد که ساخته سایت های شرط بندی می باشد و امروزه از طرفداران ویژه ای برخودار است. با گسترش اینترنت سایت های شرط بندی مختلفی ایجاد شده اند که این بازی را به صورت آنلاین ساپورت می کنند. یکی از این سایت ها، سایت معتبر نیترو می باشد. در این مقاله قصد داریم به معرفی
    سایت بازی انفجار نیترو بپردازیم.
    سایت پیش بینی فوتبال نیتر
    سایت پیش بینی فوتبال
    بازی رولت نیترو
    کازینو آنلاین

    Visit https://www.wmsociety.org/
    here for more information

    ReplyDelete
  19. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.Visit website

    ReplyDelete
  20. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.kitchenscity.com said

    ReplyDelete
  21. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.crypto

    ReplyDelete
  22. I have been looking to discover a solace or powerful Best ps4 steering to finish this procedure and I think this is the most reasonable approach to do it viably.boyumlaw.com

    ReplyDelete
  23. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.binaryoptionsdemo

    ReplyDelete
  24. { Otherwise, {you can|you are able to|it is possible to|you'll be able to} directly ask Pay - Pal {or other|or any other|or another|and other} {methods to|techniques to|solutions to|ways to} {help you|assist you to|enable you to|allow you to} on phone or through remote desktop software| Some things {to look|to appear|to check|to take a look} out for {are the|would be the|will be the|include the} {availability of|accessibility to|option of|use of} direct {phone numbers|telephone numbers|cell phone numbers|numbers}, instant messaging support, and direct emails| You will never {know exactly|know precisely|understand specifically|specifically} that {what type of|which kind of|what sort of|which} client {you are|you're|you might be|you happen to be} handling {and you have|and you've got|plus you've got|along with} to be prepared {and have|and also have|and possess|and still have} some {bunch of|couple of|few|lot of} {ideas to|suggestions to|tips to|tricks to} {make out|write out|find out|figure out} the solutions pdf data entry services

    ReplyDelete
  25. Thank you very much for writing such an interesting article on this topic. This has really made me think and I hope to read more.livrare flori cluj

    ReplyDelete
  26. I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me. kush marketplace

    ReplyDelete
  27. Very nice blog and articles. I am realy very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
    followpc.com

    ReplyDelete
  28. If you are finding the best web developing company then I'll suggest you to visit web design company denver as from there you can get all professional designer for your website.new york city

    ReplyDelete
  29. I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You.Wild Rift Tier List

    ReplyDelete
  30. yes you might be crazy but your post is owsum

    ReplyDelete
  31. A Course in Miracles: The Message:
    A Course in Miracles the message teaches us that there is a Voice for God in our minds that is always talking to us, telling us that we are: unlimited, one with all life, eternal, and literally invulnerable. That Voice is the Holy Spirit. There is another voice in our minds that we made up that lies to us and tells us we are: limited, separate, mortal, and vulnerable. That voice is the ego. A primary focus of a course in miracle’s message is to teach us how to tell these two voices apart. Once we do that we must choose to listen to the Holy Spirit and trust the Holy Spirit's counsel. We will always hear the voice of the ego while here in the dream but we should not accept its guidance or counsel about anything. In a course in miracle the message is not about the death of the ego, but how to properly relate to it.Frances Xu

    ReplyDelete
  32. Best place to design your Digital Business Crad + Mini website in Rs.99/- only
    Miniwebsite
    Digital Visiting Card
    Digital Marketing

    ReplyDelete
Emoji
(y)
:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
x-)
(k)