djinc
djinc

Reputation: 171

Verify page title in Selenium Webdriver using Ruby

I am new with ruby but familiar with selenium and I want to verify the title of the page (for example we use assertEquals with java). I tried finding everywhere but couldn't find anything suitable for ruby.

verify_title = driver.title
assertEquals("Page Title" , driver.getTitle()); //want to change this line in ruby

P.S. I want to use it without the help of cucumber.

Upvotes: 0

Views: 3000

Answers (1)

B Seven
B Seven

Reputation: 45943

assertEquals( "Page Title", driver.title )

I don't know which test framework you are using, but you'll need to change assertEquals.

See the Ruby example here.

Upvotes: 2

Related Questions