Hi Renuka, you can take help from following code snippet showing basic test script using Selenium Ruby Webdriver:
require "selenium-webdriver" # load webdriver gem to interact with Selenium
# create a driver object.
driver = Selenium::WebDriver.for :chrome
# open facebook.com inside Chrome
driver.navigate.to "https://www.facebook.com"
# find the email textfield and click it
element = driver.find_element(id: 'email')
element.send_keys('abc123')
driver.quit