Skip to content

Unable to open/click href [<a href=""] element through fluent automation. #151

@Dileep-Kumar6

Description

@Dileep-Kumar6

/* We are trying to opening a link with anchor href element...but we getting testcase failed .*/

TESTING URL:

https://leads.hdfcbank.com/applications/new_webforms/apply/personal-loan/Index.aspx?myLoan=pl&pcode=P4_hp_AppOnl_PL&tbfname=&tbMobile=&selCity=&MonsterBanner=&SourceCode=&campid=&adwcode=&keyw=&FormSource=Old&_ga=1.228355933.1704203867.1433758640

/*Please provide code for selecting dateofbirth filed in above URL and putting into the dateofbirth textfield */

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

namespace SchneiderElectric.Wonderware.PSMS.Business.Services.Test
{
[TestClass]
public class Form_submission : FluentTest
{
public Form_submission()
{
SeleniumWebDriver.Bootstrap(
SeleniumWebDriver.Browser.Chrome
);

        /*Config.Configure(new FluentSettings()
        {
            ScreenshotPath = "D:\\Murali\\Screenshots_path",
            ScreenshotOnFailedAction = true

        });*/
    }

    [TestMethod]
    public void TestForm()
    {
        I.Open("https://leads.hdfcbank.com/applications/new_webforms/apply/personal-loan/Index.aspx?myLoan=pl&pcode=P4_hp_AppOnl_PL&tbfname=&tbMobile=&selCity=&MonsterBanner=&SourceCode=&campid=&adwcode=&keyw=&FormSource=Old&_ga=1.228355933.1704203867.1433758640");
        I.Enter("You").In("#txtFName.textfield.tTip");
        I.Wait(2);
        I.Enter("Me").In("#txtLName.textfield.tTip");
        I.Wait(2);
        I.Select("Salaried").From("#ddlEmpType");
        I.Wait(2);
        I.Select("Self Employed Business").From("#ddlEmpType");
        I.Click("#accHolderY"); 
        I.Click("#txtDateOfBirth");

        I.Select("Jan").From(".ui-datepicker-month");
        I.Select("1988").From(".ui-datepicker-year");

        //I.Select("a[href='{15}']").From("a.ui-state-default ui-state-hover");  
        //I.Enter("15/01/1988").In(".textfield tTip hasDatepicker");
        //I.Select(15).From("#ui-state-default"); 
        //I.Select(15).From(".ui-state-default");
        //I.Click("a[href='{15}']");
        //I.Focus("a[href='{15}']");

        var element = I.Find("a[href='{15}']"); //GETTING ERROR HERE
        I.Select("a[href='{15}']"); //GETTING ERROR HERE
        I.Click(element);//GETTING ERROR HERE
        //I.Select(element); 

        //I.Click("ui-datepicker-current-day[href='{15}']");
        //I.Select(Option.Value, 0).From(".ui-datepicker-month");  
        I.Wait(3);
        I.Enter("040").In("#txtSTD_Res");
        I.Wait(3); 
       // I.Enter("Murali Krishna").In("#txtDateOfBirth.textfield.tTip.hasDatepicker");
       // I.Select("Jul").From("#select.ui-datepicker-month");
        //I.Select("1988").From("select.ui-datepicker-year");
        //I.Click("a.ui-state-default");

    }
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions