microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
513 stars 286 forks source link

[HOW-TO] <Short Question Description> #1260

Open chandramohand opened 2 years ago

chandramohand commented 2 years ago

Question

Hi, I am unable to use lookup on a drop-down, could you please help which method I can use to select the value in the list.

image

Thanks, Chandra.

leungs107 commented 2 years ago

I think it is an option set instead of lookup xrmApp.Entity.SetValue(new OptionSet() { Name = "optionname", Value = "Open or other value" });

chandramohand commented 2 years ago

Hi @leungs107, I tried this too where it throws Null pointer exception.

System.ArgumentNullException : input cannot be null Parameter name: input

tipsey commented 2 years ago

Have you tried Selenium code?

using OpenQA.Selenium.Support.UI;

new SelectElement(client.Browser.Driver.FindElement(By.Id("IdName"))).SelectByText("ValuesListText");

chandramohand commented 2 years ago

Yeah, today only I tried with Selenium code and worked. Thanks.