File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
src/org/labkey/test/components/ui Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,10 @@ public String getDateField(CharSequence fieldIdentifier)
253
253
* @param fieldIdentifier Identifier for the field; name ({@link String}) or fieldKey ({@link FieldKey})
254
254
* @return file attachment component
255
255
*/
256
- public FileAttachmentContainer getFileField (CharSequence fieldIdentifier )
256
+ private FileAttachmentContainer getFileField (CharSequence fieldIdentifier )
257
257
{
258
- return enableAndWait (fieldIdentifier , elementCache ().fileUploadField (fieldIdentifier ));
258
+ FieldKey identifier = FileAttachmentContainer .fileUploadFieldKey (fieldIdentifier );
259
+ return enableAndWait (identifier , elementCache ().fileUploadField (identifier ));
259
260
}
260
261
261
262
/**
@@ -279,9 +280,10 @@ public EntityBulkUpdateDialog removeFile(CharSequence fieldIdentifier)
279
280
return this ;
280
281
}
281
282
282
- public FileUploadField getExistingFileField ( String fieldIdentifier )
283
+ public FileUploadField getExistingFileCard ( CharSequence fieldIdentifier )
283
284
{
284
- return enableAndWait (fieldIdentifier , elementCache ().fileField (fieldIdentifier ));
285
+ FieldKey identifier = FileAttachmentContainer .fileUploadFieldKey (fieldIdentifier );
286
+ return enableAndWait (identifier , elementCache ().fileField (identifier ));
285
287
}
286
288
287
289
/**
Original file line number Diff line number Diff line change 6
6
import org .labkey .test .components .WebDriverComponent ;
7
7
import org .labkey .test .components .html .FileInput ;
8
8
import org .labkey .test .components .html .Input ;
9
+ import org .labkey .test .params .FieldKey ;
9
10
import org .openqa .selenium .ElementNotInteractableException ;
10
11
import org .openqa .selenium .WebDriver ;
11
12
import org .openqa .selenium .WebElement ;
@@ -195,6 +196,15 @@ protected class ElementCache extends Component<?>.ElementCache
195
196
public Locator fileUploadScrollFooterLoc = Locator .tagWithClass ("div" , "file-upload__scroll-footer" );
196
197
}
197
198
199
+ /**
200
+ * File upload fields append "-fileUpload" to the field's fieldKey
201
+ * @param fieldIdentifier Identifier for the field; name ({@link String}) or fieldKey ({@link FieldKey})
202
+ * @return FieldKey with expected suffix
203
+ */
204
+ public static FieldKey fileUploadFieldKey (CharSequence fieldIdentifier )
205
+ {
206
+ return FieldKey .fromFieldKey (FieldKey .fromName (fieldIdentifier ) + "-fileUpload" ); // Issue 53394
207
+ }
198
208
199
209
public static class FileAttachmentContainerFinder extends WebDriverComponentFinder <FileAttachmentContainer , FileAttachmentContainerFinder >
200
210
{
You can’t perform that action at this time.
0 commit comments