File Upload with Protractor - Google chrome Version 78.0.3904.97

57 views
Skip to first unread message

Karim Mohammed

unread,
Nov 15, 2019, 11:33:13 PM11/15/19
to Angular and AngularJS discussion
I have been using protractor for 2 years, today there was an issues with file upload. My scripts were working fine till yesterday  but they started to fail for file upload since afternoon when there was new version of code deployed for web app.

 I am using  Google chrome Version 78.0.3904.97,

Below is HTML :

I have 3 type="file" , Is that causing an issue .


1)<input id="file" type="file" class="upload" accept="image/*,.doc, .docx,.txt,.pdf,.xls,.xlsx,.ppt,.pptx">

2)<input _ngcontent-c54="" accept=".csv" class="sr-only" type="file">

3)<input _ngcontent-c54="" accept=".csv" class="sr-only" type="file">


I am not sure whether the issue is with web driver or new code. I am unable to upload file and I don’t see any error.

Any help is appreciated.

Sander Elias

unread,
Nov 15, 2019, 11:40:00 PM11/15/19
to Angular and AngularJS discussion
Hi Karim,

Can you upload a file outside of the testing?

Regards
Sander

Karim Mohammed

unread,
Nov 15, 2019, 11:41:12 PM11/15/19
to Angular and AngularJS discussion
Yes, I can upload with out any issue.

Karim Mohammed

unread,
Nov 17, 2019, 5:46:55 PM11/17/19
to Angular and AngularJS discussion

I was able to resolve the issue by using xpath  //input[@class='sr-only' and @type='file']

Sander Elias

unread,
Nov 18, 2019, 12:33:00 AM11/18/19
to Angular and AngularJS discussion
Hi Karim,

Thanks for sharing!

Regards
Sander
Reply all
Reply to author
Forward
0 new messages