public void UploadFile(string path)
 {
     ChoosePhotoButton.Click();
     Thread.Sleep(100);
     SendKeys.SendWait(path);
     SendKeys.SendWait("{ENTER}");
 }
        void ReleaseDesignerOutlets()
        {
            if (CameraImportImage != null)
            {
                CameraImportImage.Dispose();
                CameraImportImage = null;
            }

            if (ChooseCameraButton != null)
            {
                ChooseCameraButton.Dispose();
                ChooseCameraButton = null;
            }

            if (ChooseFilesButton != null)
            {
                ChooseFilesButton.Dispose();
                ChooseFilesButton = null;
            }

            if (ChoosePhotoButton != null)
            {
                ChoosePhotoButton.Dispose();
                ChoosePhotoButton = null;
            }

            if (FileImportImage != null)
            {
                FileImportImage.Dispose();
                FileImportImage = null;
            }

            if (ImportFromCameraDescription != null)
            {
                ImportFromCameraDescription.Dispose();
                ImportFromCameraDescription = null;
            }

            if (ImportFromCameraTitle != null)
            {
                ImportFromCameraTitle.Dispose();
                ImportFromCameraTitle = null;
            }

            if (ImportFromFilesDescription != null)
            {
                ImportFromFilesDescription.Dispose();
                ImportFromFilesDescription = null;
            }

            if (ImportFromFilesTitle != null)
            {
                ImportFromFilesTitle.Dispose();
                ImportFromFilesTitle = null;
            }

            if (ImportFromPhotosDescription != null)
            {
                ImportFromPhotosDescription.Dispose();
                ImportFromPhotosDescription = null;
            }

            if (ImportFromPhotoTitle != null)
            {
                ImportFromPhotoTitle.Dispose();
                ImportFromPhotoTitle = null;
            }

            if (PhotoImportImage != null)
            {
                PhotoImportImage.Dispose();
                PhotoImportImage = null;
            }
        }