0

I am working the Angular 7 with Protractor for e2e automated test case along with am using browserstack for multiple browser testing. In my project I have image upload option for testing image upload I have used the following code.

const path = require('path'), remote = require('selenium-webdriver/remote');
browser.setFileDetector(new remote.FileDetector());
const displayCustomLogoTextBox = element(by.id('customLogoTextbox'));
const fileToUpload = 'test-logo.png' ,
absolutePath = path.resolve(__dirname, fileToUpload);
displayCustomLogoTextBox.sendKeys(absolutePath);
applyBtn.click();

While testing with local chorme it working fine but when I am testing with browserstack it thorwing below error in this line.

displayCustomLogoTextBox.sendKeys(absolutePath);

* Failed: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 2977340326 *

Can anyone give me a quick solution to this?

Manikandan Thangaraj
  • 1,594
  • 8
  • 24
  • 44

1 Answers1

0

It worked fine when I downgraded my node to v7.7.3 since I was using protractor version 5.