-1

I am using Java. I am trying to automate a scenario, where am trying to search all details of an ID, it works fine when I test the scenario manually. It fails when I automate the scenario.

Note: I was able to successfully automate this scenario earlier.

I am getting the below response when I automate it:

{"errors":[{"message":"Context creation failed: connect ECONNREFUSED 127.0.0.1:80","extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: connect ECONNREFUSED 127.0.0.1:80","    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)"]}}}]}
  • Whether the testing is carried out in different devices?? Like you are doing manual testing in an machine which is getting passed and automation in another machine which is getting failed – Mohamed Sulaimaan Sheriff May 3 at 18:12
  • No same machine, even I cleared the browser cache and also run in incognito it was success when I do manual . – anshuman May 3 at 19:31
  • It fails if I try manually in the browser launched by driver. – anshuman May 3 at 20:06
  • It seems your application is calling the app running on the port 80 of your local machine. Is this expected? – João Farias May 3 at 20:22
  • I guess your testing with url "127.0.0.1" where port is 80. So your actual url is 127.0.0.1:80. Make a try with your local network link. 192.168.8.1:80 where 192.168.8.1 is your machine ip. – Mohamed Sulaimaan Sheriff May 3 at 22:15
2

I was getting this because I had set capability

:- chromeOptions.addArguments("--disable-web-security");

After removing this it's all fine .

Origin was not going in request headers, which is used in facade layer. if undefined then it gets replaced by local.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.