CompiledScript.OpenFileDialogHandler (Método)

Definición

Admite un escenario de carga de archivos. Abre la ventana de diálogo de carga de archivos.

Ver también Grabación de carga de archivos

public void OpenFileDialogHandler(button OpenFileDialogButton, string[] fileNames = null))

Parámetros

 botón  OpenFileDialogButton

 cadena fileNames  [ ]

 

Ejemplos

//File Upload using the file from the system storage
Step (3, "Gofile - https://gofile.io/uploadFiles");
tab0.GoTo ("https://gofile.io/uploadFiles");
OpenFileDialogHandler (OpenFileDialogButton.Ok, new string[1] {"5MB.zip"});
tab0.Button ("//BUTTON[normalize-space()=\"Click here\"]", "//BUTTON[normalize-space(text())=\"Click here\"]", "//BUTTON[@ID=\"dropZoneBtnSelect\"]").Click ();
tab0.Button ("//BUTTON[normalize-space()=\"Upload\"]", "//BUTTON[normalize-space(text())=\"Upload\"]", "//BUTTON[@ID=\"uploadFiles-btnUpload\"]").Click ();
Delay ("40sec".ToDuration ());
tab0.KeywordAssert ("successfully uploaded");
//File Upload from the external URL
tab0.Link ("//P[normalize-space()=\"Upload Files\"]/..", "//LI[@ID=\"li-uploadFiles\"]//A", "//LI[@ID=\"li-api\"]/preceding-sibling::LI[1]//A").Click ();
tab0.Download ("Q3UTw.htm", "https://dropmefiles.com/Q3UTw");
OpenFileDialogHandler (OpenFileDialogButton.Ok, new string[1] {"Q3UTR.htm"});
tab0.Button ("//BUTTON[normalize-space()=\"Click here\"]", "//BUTTON[normalize-space(text())=\"Click here\"]", "//BUTTON[@ID=\"dropZoneBtnSelect\"]").Click ();