public void CancelShareSkill() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Cancel a share skill"); // Create an class and object to call the method ShareSkill obj = new ShareSkill(); obj.ClickonShareSkillBtn(); obj.ShareProfile("Cancel"); }