icy-dawn-47793
11/22/2022, 9:01 AMfresh-doctor-14925
11/22/2022, 9:04 AMselectFile
have a force: true
option?
What does the error message say?icy-dawn-47793
11/22/2022, 9:08 AMfresh-doctor-14925
11/22/2022, 9:10 AMfresh-doctor-14925
11/22/2022, 9:11 AMicy-dawn-47793
11/22/2022, 9:17 AMicy-dawn-47793
11/22/2022, 9:19 AMfresh-doctor-14925
11/22/2022, 9:26 AMselectFile
shouldn't be an issue. I'm out of suggestions. It would be helpful for you to share the code where you're getting the element and calling selectFile()
icy-dawn-47793
11/22/2022, 9:32 AMfresh-doctor-14925
11/22/2022, 9:43 AMinput[type="file"]
, but it would be even better if you had a test id on thereicy-dawn-47793
11/22/2022, 9:44 AMicy-dawn-47793
11/22/2022, 9:45 AMfresh-doctor-14925
11/22/2022, 9:46 AMicy-dawn-47793
11/22/2022, 9:46 AMfresh-doctor-14925
11/22/2022, 9:47 AMfierce-engine-20889
11/22/2022, 1:42 PMbrash-tiger-52405
11/22/2022, 2:11 PMfull-pizza-42889
11/22/2022, 2:22 PMgray-kilobyte-89541
11/22/2022, 2:41 PMfull-pizza-42889
11/22/2022, 2:41 PMfull-pizza-42889
11/22/2022, 2:42 PMfull-pizza-42889
11/22/2022, 2:52 PMfresh-doctor-14925
11/22/2022, 2:53 PMfull-pizza-42889
11/22/2022, 2:54 PMfull-pizza-42889
11/22/2022, 2:54 PMfresh-doctor-14925
11/22/2022, 2:56 PMget()
will fail if there isn't anything there, so it wouldn't be possible to have an element yielded to the as
Best alternative I can think of is to define your (needlessly? :P) complex test ids in variables, then pass them to cy.get()
when neededfull-pizza-42889
11/22/2022, 2:57 PMfull-pizza-42889
11/22/2022, 2:58 PMdata-cy
😛full-pizza-42889
11/22/2022, 2:58 PMfresh-doctor-14925
11/22/2022, 2:59 PM