Getting tooltip value from a JS/Jquery chart

check this to get tooltip value:


public String placeMouseOverToolTipandGetText() throws InterruptedException{ 
builder.clickAndHold(driver.findElement(By.className("locator of pie chart"))).build().perform(); 
Thread.sleep(2000); 
return driver.findElement(By.xpath("locator of tooltip")).getText(); 
}

Comments

  1. This is great and this is what I was looking for. Can you please explain how to do this in Selenium IDE? Or can give the Python script for the same?

    We are using Selenium with Python based frame work. If you give the IDE version, we can export it to Python easily.

    Raveen

    ReplyDelete
    Replies
    1. Raveen,

      I am not sure if Se IDE support this as I do not use IDE often. Surely on python you can write function similar to this.

      Regards!
      BijoyMeethal

      Delete
  2. Hi
    I read this post two times.
    I like it so much, please try to keep posting.
    Let me introduce other material that may be good for our community.

    Microsoft dynamics training

    ReplyDelete
  3. It was very nice article and it is very useful to Selenium learners.We also provide Cub training software online training.

    ReplyDelete
  4. Please suggest me how to get tool tip text if tool tip does not have any locators and are displayed when mouse over a pie chart ?

    Here the title tag contains the tool tip: But I am getting empty string when trying to print the title

    "
    "< title > I did not buy (0)"
    ""

    ReplyDelete
    Replies
    1. path class="empty" style="fill: rgb(204, 204, 204);" d="M60.20141853380054,35.718191534821244A70,70 0 0,1 -60.20141853380056,35.71819153482121L-38.548403248558,23.21681733111933A45,45 0 0,0 38.54840324855798,23.216817331119366Z">
      title tag I did not buy (0) title tag

      Delete
  5. Please suggest me how to get tool tip text of SVG chart like column chart, bar chart
    i trying to find path of column but error showing Unable to locate element

    path is like //*[@id="chart"]/svg/g/g[1]/g[4]/g[1]/g[1]/g[1]/path[2]

    ReplyDelete
  6. Better if use a fluent wait until the tool tip element appears than a Thread sleep to optimize the time. Anyway good post. Thanks

    ReplyDelete
  7. Selenium training in Chennai
    We provide best selenium training in Chennai with real time scenarios.For real time training reach us 8122241286 and become experts in selenium.
    selenium training in chennai

    ReplyDelete
  8. SELENIUM
    From My search…Creating Experts provides Best Selenium Training with real time projects assistance.Most of the modules are equipped with advance level topics which the student can learn from the basics to the advance level stage.They also provide placement assistance in leading MNC companies across the globe according to the current requirements.
    And these are the Best selenium training institute which provides Real Time Hands on Training…
    http://thecreatingexperts.com/selenium-training-in-chennai/
    Codedion Technologies-9003085882
    Creating Experts-8122241286
    They also providing both Classroom/Online Training

    ReplyDelete
  9. Nice tutorial iam reading your article really it is very helpful for providing a lot of information about Selenium …. Thank you Please keep share some more…………

    ReplyDelete
  10. Australia Best Tutor is one of the best Online Assignment Help providers at an affordable price. Here All Learners or Students are getting best quality assignment help with reference and styles formatting.

    Visit us for more Information

    Australia Best Tutor
    Sydney, NSW, Australia
    Call @ +61-730-407-305
    Live Chat @ https://www.australiabesttutor.com




    Our Services

    Online assignment help Australia
    my assignment help Australia
    assignment help
    help with assignment
    Online instant assignment help
    Online Assignment help Services

    ReplyDelete
  11. Each department of CAD have specific programmes which, while completed could provide you with a recognisable qualification that could assist you get a job in anything design enterprise which you would really like.

    AutoCAD training in Noida

    AutoCAD training institute in Noida


    Best AutoCAD training institute in Noida

    ReplyDelete
  12. Hey,

    How to write an xpath for canvas tags,



    there will be to fields in the pi chart, when im trying to write the xpath for on specific field, It's selecting the entire tag. HElP ME

    ReplyDelete
  13. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time.

    CEH Training In Hyderbad

    ReplyDelete

  14. Thanks for sharing such an amazing information,its very useful for the readers.Keep sharing more,if you are interested in knowing more about data science please visit our site.
    Best Data Science Certification Course in Bangalore

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

    ReplyDelete

Post a Comment

Popular Posts