Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dileep-Kumar6 opened this issue Aug 13, 2015 · 0 comments

Comments

@Dileep-Kumar6
Copy link

/* 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");

    }
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant