Unable to upload video file in Studio

WebUI.openBrowser('')
WebUI.navigateToUrl('')

WebUI.setText(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/input_Login to your Account_email'), 
    'mojo22@yopmail.com')

WebUI.setEncryptedText(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/input_Email_password'), 
    'XYzU8O9zCzQgela8hZADCw==')

WebUI.click(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/button_Login'))

WebUI.click(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/button_Get Started'))

WebUI.click(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/button_skip'))

WebUI.click(findTestObject('Object Repository/Page_Ernie - A Social Networking Website fo_d069c4/a_New Post'))

WebUI.delay(10)


WebUI.uploadFile(findTestObject('Page_Ernie - A Social Networking Website fo_d069c4/AddVideoObj'), 'C:\\Users\\Archana\\Downloads\\SampleVideo_1280x720_1mb')

WebUI.delay(20)

WebUI.closeBrowser()

I tried to upload the video file using the above code. The test case is passing but upload is not happening. I need to click on the “Add Video” link to upload the file
I have written the below code with the file path

WebUI.uploadFile(findTestObject('Page_Ernie - A Social Networking Website fo_d069c4/AddVideoObj'), 'C:\\Users\\Archana\\Downloads\\SampleVideo_1280x720_1mb')

But it is not uploading file. Instead of this, I have tried clicking for the same “Add Video” object. At that time user was taken to the system folder. So I think no issue with the object I have used. But for the same “Add Video” Obj with the Upload File keyword, nothing happens…

Can you please help

1 Like

In your code, the path to your file does not have a file extension. It’s unlikely that a video file (on Windows) does not have an extension. Add the extension and it will probably work.

Are you working in Windows with extension display disabled? That’s not how a pro user would work. Set EVERYTHING to display normally.

can you tell it clearer
Im not understanding much

@Russ_Thomas WebUI.uploadFile(findTestObject(‘Page_Ernie - A Social Networking Website fo_d069c4/AddVideoObj’), ‘C:\Users\Archana\Downloads\SampleVideo_1280x720_1mb.mp4’)

Tried with .mp4 extension. Still it is not uploading

Also one more thing, here “Add Video” is coming under a tag and no type is showing as file.

Try forward slashes.

1 Like