public bool ChooseServiceValue(object value) { string serviceValue = null; switch (currentSerivce) { case ServiceToTry.GetMessages: { switch ((GetMessagesValue)value) { case GetMessagesValue.Inbox: case GetMessagesValue.Drafts: case GetMessagesValue.DeletedItems: case GetMessagesValue.SentItems: serviceValue = value.ToString(); break; default: serviceValue = null; break; } break; } case ServiceToTry.GetFiles: { switch ((GetFilesValue)value) { case GetFilesValue.drive_root_children: serviceValue = "drive/root/children"; break; case GetFilesValue.me_drive: serviceValue = "me/drive"; break; default: serviceValue = null; break; } break; } case ServiceToTry.GetUsers: { switch ((GetUsersValue)value) { case GetUsersValue.me: serviceValue = "me"; break; case GetUsersValue.me_manager: serviceValue = "me/manager"; break; case GetUsersValue.me_select_skills: serviceValue = "me?$select=skills"; break; case GetUsersValue.myOrganization_users: serviceValue = "myOrganization/users"; break; default: serviceValue = null; break; } break; } case ServiceToTry.GetGroups: { switch ((GetGroupValue)value) { case GetGroupValue.me_memberOf: serviceValue = "me/memberOf"; break; case GetGroupValue.members: serviceValue = "groups/41525360-8eca-49ce-bcee-b205cd0aa747/members"; break; case GetGroupValue.drive_root_children: serviceValue = "groups/41525360-8eca-49ce-bcee-b205cd0aa747/drive/root/children"; break; case GetGroupValue.conversations: serviceValue = "groups/41525360-8eca-49ce-bcee-b205cd0aa747/conversations"; break; default: serviceValue = null; break; } break; } case ServiceToTry.GetContacts: case ServiceToTry.GetEvents: default: serviceValue = null; break; } if (serviceValue != null) { GraphBrowser.SelectElement(GraphBrowser.Driver.FindElement(By.Id("valueSelection"))).SelectByText(serviceValue); isParameterValueContained = GraphBrowser.Driver.FindElement(By.Id("urlValue")).Text.Contains(serviceValue); return(true); } else { return(false); } }