Upload image native windows

I want to upload an image. following are the steps

  1. login
  2. click on “change logo” button
  3. a pop up appears with a button “select file”
  4. click on “select file”
  5. native windows is open and select file then double click to open
  6. native window is closed
  7. click “save” button
  8. image is uploaded

I tried using

WebUI.uploadFile(findTestObject(‘upload_logo/div_ChangeLogo’), ‘C:\\Users\\xyz\\Pictures\\image1.jpg’)

but getting error as

unknown error: cannot focus element

Thanks

@Vinh Nguyen can you help me on this?

kishor sharma said:

@Vinh Nguyen can you help me on this?

You are passing a ‘div’ object? Please double check again and use ‘input’ object in this case

@Vinh Nguyen thank you. your little help, helps me a lot :slight_smile:

Hi Kikishor sharma said:

I want to upload an image. following are the steps

  1. login
  2. click on “change logo” button
  3. a pop up appears with a button “select file”
  4. click on “select file”
  5. native windows is open and select file then double click to open
  6. native window is closed
  7. click “save” button
  8. image is uploaded

I tried using

WebUI.uploadFile(findTestObject(‘upload_logo/div_ChangeLogo’), ‘C:\\Users\\xyz\\Pictures\\image1.jpg’)

but getting error as

unknown error: cannot focus element

Thanks

Hi Kishor,

Can you please share to us how you solve this issue ?