Crashed in OnStart with ArgumentException: The path is not of a legal form.

Created at 23 Mar 2020, 02:28
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
abdulhamid0yusuf's avatar

abdulhamid0yusuf

Joined 23.03.2020

Crashed in OnStart with ArgumentException: The path is not of a legal form.
23 Mar 2020, 02:28


I'm getting this error when Instantiating a Selenium ChromeDriver Object.

The Exception is thrown from the last line in the code.

            var driverService = ChromeDriverService.CreateDefaultService();
            driverService.HideCommandPromptWindow = true;
            var options = new ChromeOptions();
            options.AddUserProfilePreference("profile.managed_default_content_settings.images", 2);
            options.AddArguments("--headless", "disable-gpu");
            _Session = new ChromeDriver(driverService, options);

            

The robot has the full rights to access resources

[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]

 


@abdulhamid0yusuf
Replies

abdulhamid0yusuf
23 Mar 2020, 02:41

RE: [Solved]

abdulhamid0yusuf said:

I'm getting this error when Instantiating a Selenium ChromeDriver Object.

The Exception is thrown from the last line in the code.

            var driverService = ChromeDriverService.CreateDefaultService();
            driverService.HideCommandPromptWindow = true;
            var options = new ChromeOptions();
            options.AddUserProfilePreference("profile.managed_default_content_settings.images", 2);
            options.AddArguments("--headless", "disable-gpu");
            _Session = new ChromeDriver(driverService, options);

            

The robot has the full rights to access resources

[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]

 

I Had to copy all .dll files and the chrome driver.exe in the project to the execution path of the robot, This is really overwhelming and unacceptable, there should be a platform independent solution.


@abdulhamid0yusuf