1

I am trying to use Selenium to login to a site, navigate to a page, and download a file. I have the program working perfectly on my local machine. However, when I try to deploy the program to another machine, the program runs into a "Element not interactable" error on the first text box to enter the user name. I have tried a couple of different machines, all with the same result. The only machine it is working on is mine.

Here is the code:

static void Main(string[] args)
{
    IWebDriver driver = new ChromeDriver();
    driver.Url = "myURL";

    var username = driver.FindElement(By.CssSelector("#signInFormUsername"));
    username.SendKeys("username");

    var password = driver.FindElement(By.CssSelector("#signInFormPassword"));
    password.SendKeys("password");

    driver.FindElement(By.XPath("//input[@name='signInSubmitButton']")).Click();

    driver.FindElement(By.LinkText("linktext")).Click();

    driver.FindElement(By.LinkText("Download")).Click();
}

Here is a snip of the error I get when running on a machine other than my local one.

Error Message

I have also tried WebDriverWait, but to no avail. Any help would be greatly appreciated.

  • Please check out [this answer](https://stackoverflow.com/a/57450491/2516718). Hope it helps. – derloopkat Sep 02 '20 at 13:02
  • @derloopkat any reason that the program would work on my local machine, but not elsewhere? I do not have this issue when I run it locally. I have tried the other suggested solutions in the link you posted, but I still have the same issue. – C. Arseneault Sep 02 '20 at 14:11
  • Sorry your question was marked as duplicate. If that failed try making a screen capture by code with Selenium to get an insight. Common causes for this issue are you're using different resolution locally and the page is responsive (display different buttons or menus depending on the size of the screen), another possible cause is when running remotely it takes more time to render some element (e.g. ajax calls or delayed page load) so you need to increase time out, etc. – derloopkat Sep 02 '20 at 14:26

0 Answers0