Solved

Selenium getTitle

Posted on 2013-12-05
4
323 Views
Last Modified: 2013-12-09
Hello,
I'm not sure whether getTitle is a Selenium method.  I'm at;
https://code.google.com/p/selenium/wiki/GettingStarted
The example uses;
// Check the title of the page
        System.out.println("Page title is: " + driver.getTitle());

I would like to find the web link/page which explains getTitle.

I have googled it, but the links found do not really explain getTitle.  I also searche for driver class.
Any suggestions?

What has happened to the "Test & Validation" zone?  It is not listed.  Sure wish that E&E had a Selenium expert.
thanks
0
Comment
Question by:chima
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Craig Kehler earned 500 total points
ID: 39699906
The documentation is here http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#getTitle()

The sample you linked does work fine. Make sure you have the imports and the correct version of selenium. What is it doing that isn't matching your expectations?
0
 

Author Comment

by:chima
ID: 39700050
scrutinizer, I failed to "pay attention to" this; WebDriver driver = new HtmlUnitDriver();
I get it now.
May I keep this question open and ask one more question?
0
 
LVL 6

Expert Comment

by:Craig Kehler
ID: 39701292
I thought that might be it. If you want to see their example actually run through the browser just change it to WebDriver driver = new FirefoxDriver();

If the other question is relevant to the title of this one, I don't mind trying to answer it. But if it is on a different tangent it might be better to ask a new question so other users can find the solution later (assuming I can answer it) :)
0
 

Author Closing Comment

by:chima
ID: 39706574
scrutinizer, you are right.  It is best to start a new question.  Plus I don't have one at the moment that pertains to Selenium.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question