Hi Team,
We have utilized following autopilot capability for test script and UiPath has interpreted as followed for SAP login activity.
Added screes to object repository as well.
Interpreted code:
using System;
using System.Collections.Generic;
using UiPath.CodedWorkflows;
namespace SAPTestingProject
{
public class Verify_successful_login : CodedWorkflow
{
[TestCase]
public void Execute()
{
// Code Generation:
// Open chrome browser
// Open URL ‘https://URL’
// Enter ‘’ in username field
// Enter '’ in Password field
// Click on Log On Button. It is expected to: SAP main screen loads
uiAutomation.SetDefaultRuntimeBrowser();
// Open the URL in Chrome browser
var chromeApp = uiAutomation.Open(“SAP Logon”, “Chrome”);
chromeApp.GoToUrl(“https://URL”);
// Enter username and password
chromeApp.TypeInto(“username”, “");
chromeApp.TypeInto(“Password”, "”);
// Click on Log On Button
chromeApp.Click(“Log On”);
}
}
}
While debugging the code it is throwing Error :
Unexpected error has occurred during the library compilation process:
The assembly compilation returned the following errors:
- D:\UiPath\SAPTestingProject\Validate Login with Valid Credentials.cs(19,42): error CS1061: ‘object’ does not contain a definition for ‘Open’ and no accessible extension method ‘Open’ accepting a first argument of type ‘object’ could be found (are you missing a using directive or an assembly reference?)
- D:\UiPath\SAPTestingProject\Verify Chrome Launch.cs(18,69): error CS0103: The name ‘CheckStateOptions’ does not exist in the current context
- D:\UiPath\SAPTestingProject\Verify Chrome Launch.cs(18,98): error CS0103: The name ‘NCheckStateMode’ does not exist in the current context
- D:\UiPath\SAPTestingProject\Verify Chrome Launch.cs(19,63): error CS0103: The name ‘CheckStateOptions’ does not exist in the current context
- D:\UiPath\SAPTestingProject\Verify Chrome Launch.cs(19,92): error CS0103: The name ‘NCheckStateMode’ does not exist in the current context