Handling Basic Web Elements Using Sample Program

Will see how to write a sample program using Fluent Automation and here will deal with few basic web element handling i.e. Input box,Button and Dropdown/Combo box using Fluent Automation.

Along with those elements, how to launch firefox browser, maximizing the window.and navigating to the particular Url/site.

Below is the sample program for the points which discussed:

using FluentAutomation;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassLibrary1
{
    [TestClass]
    public class HandlingBasicWebElements : FluentTest
    {
        [TestMethod]
        public void basicWebElements()
        {
		// Launching firefox Browser
      SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Firefox);               
// Maximizing the Browser
Config.WindowMaximized(true);   
// Navigate to the specified site
     I.Open("https://www.elbowspace.com/FRHformexample8.htm");               
// Entering data into textbox
          I.Enter("abcd@xyz.com").In("#dvitm4>input");  
          I.Enter("Fluent Automation Book").In("#tditma9>input");
          I.Enter("200").In("#tditmc9>input");
          I.Enter("FirstName").In("#dvitm46>input");
          I.Enter("LastName").In("#dvitm48>input");
          I.Enter("Address 1").In("#dvitm49>input");
          I.Enter("City").In("#dvitm51>input");
          // Selecting value from the Dropdown using index
I.Select(2).From("#dvitm52>select");                            I.Enter("36006").In("#dvitm53>input");
          // Clicking on Element
          I.Click("#dvitm80>div>input:nth-child(1)");   
          I.Click("#dvitm66>div>input:nth-child(2)");
          I.Click("input[type='submit']");
        }
    }
}
Selenium Tutorials: 

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.