Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python selenium不会在嵌入标记中单击flash upload_Python_Selenium_Selenium Webdriver_Ui Automation_Embed Tag - Fatal编程技术网

Python selenium不会在嵌入标记中单击flash upload

Python selenium不会在嵌入标记中单击flash upload,python,selenium,selenium-webdriver,ui-automation,embed-tag,Python,Selenium,Selenium Webdriver,Ui Automation,Embed Tag,我试图直接点击它,并尝试切换帧,但当我手动点击它时,它不会自动运行,它会工作并打开一个窗口弹出窗口来上传文件 但使用selenium不会: <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_

我试图直接点击它,并尝试切换帧,但当我手动点击它时,它不会自动运行,它会工作并打开一个窗口弹出窗口来上传文件 但使用selenium不会:

<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>

现在你有什么代码?是否在iframe中-如果是,则显示包含它的HTML代码。谢谢。它不在任何iframe中,只是一个嵌入标记。当我在google时,我发现这可以使用switch frame处理,但我没有做到这一点。这里是完整的Xpath/html/body/div[2]/div[1]/div[2]/div[2]/div[2]/div[2]/ul[2]/divOK,您能展示相同的完整代码实现吗?embeddetag=self.driver.find\u element\u by\u xpath//div[@id='ysi\u fname\u addfile\u box']/embed self.driver.switch_to_frameEmbeddeTag EmbeddeTag.click这应该会打开一个窗口弹出窗口,但它不会做任何事情没有弹出窗口不例外@rupshshinde ingnore格式这件事不起作用而不是Xpath//div[@id='ysi\u fname\u addfile\u box']/‌​嵌入,请尝试使用此Xpath,看看会发生什么。EmbeddeTag=self.driver.find_element_by_xpath//input[@id='id']//embed[@type='application/x-shockwave-flash']