-2

I tried multiple ways to upload the image through the Windows File Explorer using WinAppDriver and Appium in C#, but I still couldn’t get it to work. I tested different approaches to interact with the file dialog and send the file path, but the image is not getting uploaded. At this point, I couldn’t find a reliable solution and may need guidance or an alternative method.

my code

public void UploadImage(string imagePath)
    {
        driver.SwitchTo().Window(driver.WindowHandles.Last());

        var fileNameBox = driver.FindElementByAccessibilityId("1148");
        fileNameBox.Clear();
        fileNameBox.SendKeys(imagePath);
        fileNameBox.SendKeys(OpenQA.Selenium.Keys.Enter);
    }
1
  • 1
    Please provide enough code so others can better understand or reproduce the problem. Commented Nov 22 at 15:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.