Skip to content

How to run EasyRepro Test on remote server (Selenium Grid) #648

@sanjotsaini

Description

@sanjotsaini

Hi,
I have created the project using Easyrepo for D365 and my project is ready I'm able to run it locally but I want to run it on a remote server like on selenium Grid

I have given the have given url of my selenium hub where I have to run the test in app.config below is code:-

This is my testsettings class: -
namespace Microsoft.Dynamics365.UIAutomation.Sample
{
public static class TestSettings
{
public static string InvalidAccountLogicalName = "accounts";

    public static string LookupField = "primarycontactid";
    public static string LookupName = "Rene Valdes (sample)";
    private static readonly string Type = System.Configuration.ConfigurationManager.AppSettings["BrowserType"].ToString();
    private static readonly string RemoteType = System.Configuration.ConfigurationManager.AppSettings["RemoteBrowserType"].ToString();
    private static readonly string RemoteHubServerURL = System.Configuration.ConfigurationManager.AppSettings["RemoteHubServer"].ToString();

    private static BrowserOptions options = new BrowserOptions
    {
        BrowserType = (BrowserType)Enum.Parse(typeof(BrowserType), Type),
        PrivateMode = true,
        FireEvents = false,
        Headless = false,
        UserAgent = false,
        //DefaultThinkTime = 2000,
        RemoteBrowserType = (BrowserType)Enum.Parse(typeof(BrowserType), RemoteType),
        RemoteHubServer = new Uri(RemoteHubServerURL)
        
    };

    public static BrowserOptions Options { get => options; set => options = value; }

This is my base class : -
protected readonly Uri _xrmUri = new Uri(System.Configuration.ConfigurationManager.AppSettings["OnlineCrmUrl2"].ToString());
protected readonly Uri baseURL = new Uri(System.Configuration.ConfigurationManager.AppSettings["EmailAPiURL"].ToString());
protected readonly String _EmailAPIusername = System.Configuration.ConfigurationManager.AppSettings["EmailAPIUsername"].ToString();
protected readonly String _EmailAPIpassword = System.Configuration.ConfigurationManager.AppSettings["EmailAPIPassword"].ToString();
protected XrmApp xrmApp = new XrmApp(new WebClient(TestSettings.Options));

Can someone help me to run the test please ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions