Unable to locate the 'File Upload' window to proceed with file upload using Python 3.4/Selenium web driver in windows10

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to locate the 'File Upload' window to proceed with file upload using Python 3.4/Selenium web driver in windows10

Ranjana Palanivel

Hi All,

I am unable to locate the 'File Upload' window while writing automation script for web page to upload the file.

I have tried with these two different scripts to achieve this:But 'Unable to locate 'File Upload' /'fileUploadID' exception is thrown.

PFA the screenshot for further details.
Please help me out on this.
(a)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
driver.switch_to.window("File Upload")
element=driver.find_element_by_name("File name")
element.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
(b)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
filepath=driver.find_element_by_id("fileUploadId")
filepath.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
Thanks & Regards
Ranjana P

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANS_8%3DvJcZK%2BzZORVb9zdFHW62%2BnovF-timzV-jEZfO%3DPCtvFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

fileupload.png (79K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to locate the 'File Upload' window to proceed with file upload using Python 3.4/Selenium web driver in windows10

Mahmoud Abuzaid
Try to use send key instead of click because the windows not related to the browser I use send key and the sneding the “file_path/file_name” to the upload dile button 

On Thu, May 17, 2018 at 3:51 AM Ranjana Palanivel <[hidden email]> wrote:

Hi All,

I am unable to locate the 'File Upload' window while writing automation script for web page to upload the file.

I have tried with these two different scripts to achieve this:But 'Unable to locate 'File Upload' /'fileUploadID' exception is thrown.

PFA the screenshot for further details.
Please help me out on this.
(a)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
driver.switch_to.window("File Upload")
element=driver.find_element_by_name("File name")
element.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
(b)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
filepath=driver.find_element_by_id("fileUploadId")
filepath.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
Thanks & Regards
Ranjana P

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANS_8%3DvJcZK%2BzZORVb9zdFHW62%2BnovF-timzV-jEZfO%3DPCtvFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards

Mahmoud A. Zaid
Software Quality Engineer 
+201111632666

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALAOJfCZkthEMjMP--Kz%2BVD6RWVah6nnLpZwVGoyPbV0xCaBLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to locate the 'File Upload' window to proceed with file upload using Python 3.4/Selenium web driver in windows10

Nimesh.T.Prajapati
Hi,

Possible to share html code, there might be possibility of browse control as hidden

Nimesh T. Prajapati
Automation Engineer | Manual Testing
"Quality does matter..."

WebDriver+Testng+Maven+Ant+Sikuli

On Thu, May 17, 2018 at 7:44 AM, Mahmoud Abuzaid <[hidden email]> wrote:
Try to use send key instead of click because the windows not related to the browser I use send key and the sneding the “file_path/file_name” to the upload dile button 

On Thu, May 17, 2018 at 3:51 AM Ranjana Palanivel <[hidden email]> wrote:

Hi All,

I am unable to locate the 'File Upload' window while writing automation script for web page to upload the file.

I have tried with these two different scripts to achieve this:But 'Unable to locate 'File Upload' /'fileUploadID' exception is thrown.

PFA the screenshot for further details.
Please help me out on this.
(a)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
driver.switch_to.window("File Upload")
element=driver.find_element_by_name("File name")
element.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
(b)
driver.find_element_by_xpath('//img[@src="/img/white_upload.png"]').click()  #Upon clicking this image ,File upload window opens
wait = WebDriverWait(driver, 10)
wait.until(EC.new_window_is_opened)
filepath=driver.find_element_by_id("fileUploadId")
filepath.send_keys("C:\\Users\\ranjana.palanivel\\Aaj Jane Ki Zid Na Karo.mp3")
Thanks & Regards
Ranjana P

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANS_8%3DvJcZK%2BzZORVb9zdFHW62%2BnovF-timzV-jEZfO%3DPCtvFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards

Mahmoud A. Zaid
Software Quality Engineer 
+201111632666

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALAOJfCZkthEMjMP--Kz%2BVD6RWVah6nnLpZwVGoyPbV0xCaBLQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADuUwCAxtZfRBK5SBEkhE6-f6Fg7BuCH0DzOvp83iRh_VSAoog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.