Code for Adding from the dropdown list
Posted: Wed Dec 12, 2018 7:44 pm
hello,
i have a problem, i am trying to write a custom code that will take value from user and click on the value in the drop down list to add widget. so far my code is
public static void AddWidget(RepoItemInfo selecttaginfo, string widgetname)
{
var repo = BottomLineIIRepository.Instance;
var widgetbox = repo.DigitalBanking.widgetbox;
var option1 = repo.DigitalBanking.Payees.option;
repo.DigitalBanking.widgetbox.Click(); <-this is clicking the drop down box
option1.Element.SetAttributeValue("label",widgetname); <-here i want to click on the innertext or label of option provided by the user
option1.Click();
} there are 15 widgets so i have 15 test cases. i will use the code in all the test cases to add relevant widget.
please help.
i have a problem, i am trying to write a custom code that will take value from user and click on the value in the drop down list to add widget. so far my code is
public static void AddWidget(RepoItemInfo selecttaginfo, string widgetname)
{
var repo = BottomLineIIRepository.Instance;
var widgetbox = repo.DigitalBanking.widgetbox;
var option1 = repo.DigitalBanking.Payees.option;
repo.DigitalBanking.widgetbox.Click(); <-this is clicking the drop down box
option1.Element.SetAttributeValue("label",widgetname); <-here i want to click on the innertext or label of option provided by the user
option1.Click();
} there are 15 widgets so i have 15 test cases. i will use the code in all the test cases to add relevant widget.
please help.