Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:44:08+00:00 2026-06-03T09:44:08+00:00

I have been trying to parse for this certain piece of text in a

  • 0

I have been trying to parse for this certain piece of text in a webpage with selenium and cannot figure out why I cannot display the text I want. The snippet of code on the page is as such

<div id="BVRRRatingOverall_Review_Display" class="BVRRRating BVRRRatingNormal BVRRRatingOverall">
<div class="BVRRLabel BVRRRatingNormalLabel"/>
<div class="BVRRRatingNormalOutOf">
<span class="BVRRNumber BVRRRatingNumber">4</span>
<span class="BVRRSeparatorText">out of</span>
<span class="BVRRNumber BVRRRatingRangeNumber">5</span>
</div>
</div>

Where I want to get the text “4 out of 5”. I am using firebug to check my xpath/cssSelector is valid but selenium still cannot find the text. I have tried different implementation of waits and cssSelectors to try and remedy this too. Nothing seems to work. The code I am currently working with is

String Url2 = "http://www.walmart.com/catalog/allReviews.do?product_id=16207347";
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(Url2);
System.out.println("test" + driver.findElement(By.cssSelector(".BVRRSeparatorText")).getText());

Where I am just trying to print “test out of” to screen but I only print “test”. Does anyone know how I can get this to work? Ive looked around the internet but nothing I found worked.

The equivalent xpath I am also testing for this case is //*[@id='BVRRRatingOverall_Review_Display']/div[@class='BVRRRatingNormalOutOf']/span[@class='BVRRSeparatorText']

Edit* I think the problem is because the text is never actually displayed on the webpage. Its text that would only be seen upon hovering over the element on the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:44:10+00:00Added an answer on June 3, 2026 at 9:44 am

    You can get the alt text of the ratings star image instead.

    The Ruby syntax is (not sure the exact syntax for the other languages but similar should exist):

    e = driver.find_element(:css, ".BVImgOrSprite")                                                    
    puts e.attribute('alt')                                                                       
    # => 4 out of 5       
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying for days to figure out how to parse this JSON
I simply can't figure this out and have been trying for awhile. I need
I have been trying to parse the bottom table on this site using different
ok this is driving me crazy. I have been trying to parse a xml
I have been trying to parse this ( http://app.calvaryccm.com/mobile/android/v1/devos ) URL using a SAX
I have been trying to parse this xml in c# <schema uri=http://blah.com/schema > <itemGroups>
I've been trying to figure out a way of presenting data dynamically but have
I've been trying to use buildExpressionParser to parse a language, and I almost have
I have been trying to align an entire label along with text to the
I have been trying to parse webpages by use of the HTML DOMObject in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.