1

I tried to click on it directly and tried switching frame but it doesn't automate it when i manually click on it it works an d open a window popup to upload file but using selenium it doesn't:

<div>
    <input id="id" name="name" type="file" class="class" size="31" style="display: none; background-color: grey;" width="95" height="31">
    <embed src="some_url" quality="high" width="95" height="31" id="fnameUploader" class="fileUploaderBtn" name="fnameUploader" type="application/x-shockwave-flash">
</div>
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Bilal Naqvi
  • 140
  • 1
  • 11
  • What code do you have at this point? Is it inside an iframe - if yes, show the HTML code including it. Thanks. – alecxe Dec 30 '14 at 07:34
  • it is not in any iframe just an embed tag while i was google i found out that this can be handle using switch frame but i failed to do so here is the complete Xpath "/html/body/div[2]/div[2]/div[1]/div[2]/div[2]/div[2]/div[2]/ul[2]/div" – Bilal Naqvi Dec 30 '14 at 07:55
  • OK, Can you show your Complete code Implementation for the same? – Rupesh Shinde Dec 30 '14 at 07:58
  • `embedtag=self.driver.find_element_by_xpath("//div[@id='ysi_fname_addfile_box']/embed")` `self.driver.switch_to_frame(embedtag)` `embedtag.click()#this should open a window popup but it doesn't do any thing no popup no exception` @RupeshShinde ingnore the formatting this is thing is not working – Bilal Naqvi Dec 30 '14 at 08:01
  • Instead of Xpath ("//div[@id='ysi_fname_addfile_box']/‌​embed"), Please try to use this Xpath and see what happens. embedtag=self.driver.find_element_by_xpath(" //input[@id='id']//embed[@type='application/x-shockwave-flash']") – Rupesh Shinde Dec 30 '14 at 08:16
  • i tried that too it click but browser doesn't detect it.... – Bilal Naqvi Dec 30 '14 at 09:31

0 Answers0