I have a problem with clicking an element using XPath in selenium. Here is the HTML element for the problem :
<label for="file" class="pb default" style="display: inline-block;margin: 5px 10px;">Select File</label>
Do you know the solution for this? Any response is really appreciated.
UPDATE :
here is the whole source code for the problem
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<BASE HREF="http://1.1.1.19/webclient/utility">
<link rel=stylesheet type="text/css" href="../webclient/skins/skins-20190807-1904/iot18/css/filex.css">
</head>
<body style="background: transparent; background-color: transparent">
<form name="IMPORT" id="IMPORT" enctype="multipart/form-data" method="post">
<input type="hidden" NAME="componetId" VALUE="itemimage_3_1-if">
<input type="hidden" NAME="controlId" VALUE="itemimage_3_1">
<table width="100%" cellspacing="0" align="center" class="maintable">
<tr>
<td align="left" style="white-space: nowrap;">
<label for="file" class="pb default" style="display: inline-block;margin: 5px 10px;">Select File</label>
<input id="fileName" onmousedown="" type="text" value="" class="fld fld_ro text ib" readonly size="50"/>
<input id="file" type="file" name="value" title="Specify a New File" onchange="" size="35" class="text" style=" width: 0.1px;height: 0.1px !important;fileStyle: 0;overflow: hidden;position: absolute;z-index: -1;opacity: 0;" value="" onclick="if(!parent.undef(parent.firingControl) && parent.firingControl.id==this.id){parent.sendEvent('clientonly','clickFileButton', this.id)}">
</td>
</tr>
</table>
</form>
</body>
<script>
document.querySelector('#file').addEventListener('change', function(e){
document.querySelector('#fileName').value = e.currentTarget.files[0].name;
});
</script>
</html>
Can try with //label[#for='file'] or //label[#for='file'][text()='Select File']
If this is not working maybe you are targeting the wrong element or you are not waiting enough before it appears. When dealing with uploading files, I target the input with type file //input[#type='file'], not the label, you may need to provide bigger part of your HTML.
if class=pb default is a unique class in the web-page then try this out.
driver.driver.find_element(By.XPATH,'//*[#class="pb default"]').click()
or you can search by text Select File
driver.find_element(By.XPATH,'//*[contains(text(),"Select File")]').click()
Well No, you don't click on a <label> element. However, you may require to locate the <label> element for other purposes.
To identify the <label> element you can use either of the following Locator Strategies:
Using css_selector:
element = driver.find_element(By.CSS_SELECTOR, "label.pb.default[for='file']")
Using xpath:
element = driver.find_element(By.XPATH, "//label[#class='pb default' and text()='Select File']")
Update
Element can be within an <iframe> or within a #shadow-root. Otherwise the locator works perfecto:
Related
I am trying to get the value form an input field that is in an iframe. I switched to the iframe but the program is still unable to find the element, so a time out exception is raised. I am using the internet explorer web driver and I can not use any other driver because the website only works in internet explorer.
The code I use:
browser = webdriver.Ie()
browser.get('http://www.thewebsite.com')
wait = WebDriverWait(browser, 10)
wait.until(EC.frame_to_be_available_and_switch_to_it((By.ID, 'Content')))
MRR = wait.until(EC.element_to_be_clickable((By.XPATH, "//INPUT[#id='txtTotalMonthlyCharge']"))).get_attribute('value')
I already tried increasing the wait time and also locationg by ID
The HTML:
<iframe id="Content">
<html>
<head>
</head>
<body style="margin-left: 0; margin-top: 0; overflow:hidden">
<form name="frmServicesTree" method="post" action="ServicesTree.aspx?AccountNo=50084779&pageID=SERVICESTREE" id="frmServicesTree">
<table>
<tr>
<td class="flowLabel" width="140px"><span id="txtTotalMonthlyChargelabel" style="width:95%;height:17px;">Total Monthly Charge</span></td><td class="flowReadOnly"><input name="txtTotalMonthlyCharge" id="txtTotalMonthlyCharge" type="text" readonly="" tabindex="-1" value="JA$11,199.00" style="vertical-align:top;width:100%;" /></td>
</tr>
</table>
</body>
</iframe>
I am trying to find a string. But it doesn't seem to work.
HTML:
<form name="form1" method="post" action="?cz=del&wbid=7683290543&zjt=aaa&lx=CNAME&xl=%C4%AC%C8%CF&fs=" onSubmit="return b_ifsf('delete?');" id="form1">
<td style="width:120px">
<input type="hidden" name="ip" value="aaa.xxx.com.a.bdydns.com." >
<input type="submit" name="rpt$btnDelete" value="delete" />
</td>
</form>
<form name="form1" method="post" action="?cz=del&wbid=2324242122&zjt=bbb&lx=CNAME&xl=%C4%AC%C8%CF&fs=" onSubmit="return b_ifsf('delete?');" id="form1">
<td style="width:120px">
<input type="hidden" name="ip" value="bbb.xxx.com.a.bdydns.com." >
<input type="submit" name="rpt$btnDelete" value="delete" />
</td>
</form>
<form name="form1" method="post" action="?cz=del&wbid=2324242553&zjt=ccc&lx=CNAME&xl=%C4%AC%C8%CF&fs=" onSubmit="return b_ifsf('delete?');" id="form1">
<td style="width:120px">
<input type="hidden" name="ip" value="ccc.xxx.com.a.bdydns.com." >
<input type="submit" name="rpt$btnDelete" value="delete" />
</td>
</form>
How to find out the key word bbb.xxx.com.a.bdydns.com. and then hit submit to delete it?
#EVNRaja's solution was in the right direction.
To locate the text bbb.xxx.com.a.bdydns.com. then click the associated element with value attribute as delete you can use either of the following solutions:
Using xpath and click():
driver.find_element_by_xpath("//form[#id='form1' and #name='form1']//input[#name='ip' and #value='bbb.xxx.com.a.bdydns.com.']//following::input[1]").click()
Using xpath and submit():
driver.find_element_by_xpath("//form[#id='form1' and #name='form1']//input[#name='ip' and #value='bbb.xxx.com.a.bdydns.com.']//following::input[1]").submit()
The URL you are trying to identify is quoted as hidden element.
The html code you have provided:
<input type="hidden" name="ip" value="bbb.xxx.com.a.bdydns.com." >
All the hidden elements in a browser may have a purpose.
Example:
Consider there is text-field and it doesn't numeric values as input, if end-user enters any numeric values there will be an error code displays next to the text-field.
Here, until we enter a numeric text the error message (text inside html tag element) will be hidden.
In the html code you have shared, the value which you want to inspect was quoted inside input tag and has a type="hidden" name="ip" value="bbb.xxx.com.a.bdydns.com.", we can write a compound xpath as follows:
A example with multiple compound statements:
//input[#type = 'hidden' and #name = 'ip' and contains(#value, 'bbb.xxx.com.a.bdydns.com.')]/following-sibling::input
or
A Simple example:
//input[contains(#value, 'bbb.xxx.com.a.bdydns.com.')]/following-sibling::input
With this xpath code we can directly identify the submit and in the next step you can click the button.
You should be able to use a css selector combination of:
[value='bbb.xxx.com.a.bdydns.com.'] + input
Code:
driver.find_element_by_css_selector("[value='bbb.xxx.com.a.bdydns.com.'] + input").click() #.submit()
The first part is an attribute = value css selector then the "+" is an adjacent sibling combinator, followed by an element selector; saying, find input tag element that is an adjacent sibling element to element with attribute value having value of bbb.xxx.com.a.bdydns.com.
Edited based on the answers:
I am using Selenium with Python and trying to locate a button on an web application on Chrome. The block of code has an iframe as mentioned in the answer.
<iframe data-bind="attr: { src: src, foo: $root.registerTargetDisplayFrame($data, $element) }, event: {load: function() {loaded(true);}, focus: $root.blurredNavigationPane}" src="https://products.com/InfoShareAuthor/home">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>code here
<frameset id="IshTop" class="infoshareauthor" framespacing="0" border="0" bordercolor="#FFFFFF" frameborder="0" rows="31,25,*,0">
<frame id="MenuBar" scrolling="no" name="MenuBar" src="./MainMenuBar.asp">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<body>
<div id="Top-Menu-Container">
<div id="top-menu-wrapper">
<div id="top-menu">
<form name="MainBar">
<script type="text/javascript" language="javascript">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="95" valign="bottom">
<td width="95" valign="bottom">
<div style="POSITION: relative;">
<div height="30" style="POSITION: absolute; z-index:0; top: 4px; margin-left: -5px">
<a href="javascript:TabSelect(1);">
<img border="0" src="./UIFramework/tab_active.png">
</a>
</div>
<div onclick="javascript:TabSelect(1);" style="POSITION: absolute; z-index:2; top: -8px">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="MenuButton1" class="tab_active" width="95" valign="bottom" height="30" align="center" style="cursor:pointer;padding-bottom:2px;" name="Repository">Repository</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
<td width="95" valign="bottom">
<td width="95" valign="bottom">
<td width="95" valign="bottom">
<td width="95" valign="bottom">
</tr>
</tbody>
</table>
</form>
</div>
<div id="top-help">
<div id="top-nav-links">
</div>
</div>
</body>
</html>
</frame>
<frame id="BreadCrumbs" frameborder="0" border="0" scrolling="no" name="BreadCrumbs" src="./BreadCrumbs.asp">
<frameset id="Application" bordercolor="#0099CC" frameborder="0" rows="0,*,0,0,0,0">
<frameset id="HiddenFrameSet" bordercolor="#0099CC" frameborder="0" rows="0,0,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1">
<noframes> It looks like your browser doesn't support frames. This page requires frames in order to function. <br><br>For more information, please <a href='http://www.trisoftcms.com/en/contact-us.html' target=_blank style='white-space:nowrap'>contact us</a>. </noframes>
</frameset>
</html>
</iframe>
I switched frames using this:
iframe = browser.find_element_by_xpath("//iframe[#src='https://products.com/InfoShareAuthor/home']")
browser.switch_to.frame(iframe)
The code that I wrote:
browser.find_element_by_xpath("//td[#id='MenuButton1'][#name='Repository'][contains(text(),'Repository')]")
I could find the element using this xpath when I did a Firebug search
I also tried:
browser.find_element_by_id("MenuButton1")
and
browser.find_element_by_name("Repository")
Note: When I click the button, the URL does not change. Just a list of items in the application expands. Also, IDs and the Names are unique for the seven five menu buttons. None of the menu buttons work.
Does any one have any idea about what might be wrong? I am very new to Python and Selenium.
This doesn't exactly answer your question, but it does address what you're trying to do: it is likely you can accomplish the same task (and many others) with SDL's API client ISHRemote.
https://github.com/sdl/ISHRemote
For example, if you're looking for all the directories under '\General':
Import-Module ISHRemote
# first authenticate
$session = New-IshSession -IshPassword $password -IshUserName $username -WsBaseUrl 'https://ccms.example.com/InfoShareWS/'
# get a list of all the child folders under General
Get-IshFolder -IshSession $session -FolderPath '\General' -Recurse -Depth 2
Or if you're trying to get a list of files in a particular directory:
Import-Module ISHRemote
# first authenticate
$session = New-IshSession -IshPassword $password -IshUserName $username -WsBaseUrl 'https://ccms.example.com/InfoShareWS/'
# get all content in this folder
Get-IshFolderContent -IshSession $session -FolderPath 'General\path\to\topics'
With ISHRemote, you can also find and update publications, move content, modify metadata, etc.
Hope that helps.
you can try load iframe url. It avoids issues with selenium waiting from the iframe to load
I'm trying to upload images through Python Selenium, it worked before but now they random generate the ID of button. I've tryed with different css path,xpath to make it working but i don't have any other ideea.
HTML
<div id="ImageUpload" class="form-section" style="position: relative;">
<div class="file-input-wrapper">
<button id="ImageUploadButton" type="button" class="button-update-cancel short file-upload-button ">
Select Images</button>
<input type="hidden" name="file" id="FileUploadInput">
<span class="field-message" data-for="FileUploadInput"></span>
<p class="message"><strong>Get at least twice the number of replies by uploading images</strong><br>Max 10 images. File size can be 15 MB per image with max dimension 6000x4000. For bitmap(.bmp) images, max file size is 4MB.</p>
<p class="file-input-current file-uploading">Uploading...</p>
<ol id="UploadingImages"></ol>
<p class="image-select">Select a "MAIN" image :</p>
<ol id="UploadedImages">
</ol>
</div>
<input type="hidden" name="images">
<div id="flash_19b01203e1o5npfd1nulhk11f293_container" class="moxie-shim moxie-shim-flash" style="position: absolute; top: 5px; left: 0px; width: 99px; height: 21px; overflow: hidden;"><object id="flash_19b01203e1o5npfd1nulhk11f293" type="application/x-shockwave-flash" data="Moxie.cdn.swf" width="100%" height="100%" style="outline:0"><param name="movie" value="Moxie.cdn.swf"><param name="flashvars" value="uid=flash_19b01203e1o5npfd1nulhk11f293&target=moxie.core.EventTarget.instance.dispatchEvent"><param name="wmode" value="transparent"><param name="allowscriptaccess" value="always"></object></div></div>
<object id="flash_19b01203e1o5npfd1nulhk11f293" type="application/x-shockwave-flash" data="Moxie.cdn.swf" width="100%" height="100%" style="outline:0"><param name="movie" value="Moxie.cdn.swf"><param name="flashvars" value="uid=flash_19b01203e1o5npfd1nulhk11f293&target=moxie.core.EventTarget.instance.dispatchEvent"><param name="wmode" value="transparent"><param name="allowscriptaccess" value="always"></object>
And the python code
### IMAGE UPLOAD ###
img_path="C:\\1.jpg"
s = win32com.client.Dispatch('WScript.Shell')
time.sleep(3)
browser.find_element_by_id('#flash_19b01203e1o5npfd1nulhk11f293').click()
time.sleep(2)
s.SendKeys(img_path, 0)
time.sleep(2)
s.SendKeys("{ENTER}", 0)
Any suggestions?
If the id is always changing, look for a different way of identifying the element.
Is the element always the first flash object inside the <div id="ImageUpload" element? If so, try this:
browser.find_element_by_xpath("//div[#id='ImageUpload']//object[#type='application/x-shockwave-flash']").click()
I am trying to upload images to ImageBam by filling its web-forms and requesting POST.
I don't know too much about urllib2, httplib, multipart stuff. I am trying to use MECHANIZE module
But I think it shouldn't be too complex because it is just a web form, I will fill it and post it.
The page, where upload forms are:
http://www.imagebam.com/basic-upload
The form I am trying to fill:
<form name='form' id='form' enctype="multipart/form-data" method="post" action="/sys/upload/save">
<table align="center">
<tr>
<td>
01: <input type="file" name="file[]" size="30"><br>
02: <input type="file" name="file[]" size="30"><br>
03: <input type="file" name="file[]" size="30"><br>
04: <input type="file" name="file[]" size="30"><br>
05: <input type="file" name="file[]" size="30"><br>
also I saw a guy created an app using python;
http://sourceforge.net/projects/pymguploader/files/pymguploader/2011-12-24/
I want to write something like that, but much more basic of course.
anyway, here is my problem;
when I execute these;
import mechanize
a=mechanize.Browser()
a.open("http://www.imagebam.com/basic-upload")
forms=mechanize.ParseResponse(response)
a.select_form(nr=0)
dosya=open("file path...","r")
everything works fine I think.
also
print a
gives this output:
<Browser visiting http://www.imagebam.com/basic-upload
selected form:
<form POST http://www.imagebam.com/sys/upload/save multipart/form-data
<FileControl(file[]=<No files added>)>
<FileControl(file[]=<No files added>)>
<FileControl(file[]=<No files added>)>
<FileControl(file[]=<No files added>)>
<SelectControl(content_type=[*x, 1, 0])>
<SelectControl(thumb_size=[*100, 150, 180, 250, 300, 350])>
<SelectControl(thumb_aspect_ratio=[crop, *resize])>
<SelectControl(thumb_file_type=[gif, *jpg])>
<CheckboxControl(thumb_info=[1])>
<CheckboxControl(gallery_options=[*1])>>
>
but when I
a["file[]"]=dosya
the error is;
Traceback (most recent call last):
File "<pyshell#46>", line 1, in <module>
a["file[]"]=dosya
File "build\bdist.win32\egg\mechanize\_form.py", line 2780, in __setitem__
control = self.find_control(name)
File "build\bdist.win32\egg\mechanize\_form.py", line 3101, in find_control
return self._find_control(name, type, kind, id, label, predicate, nr)
File "build\bdist.win32\egg\mechanize\_form.py", line 3183, in _find_control
raise AmbiguityError("more than one control matching "+description)
AmbiguityError: more than one control matching name 'file[]'
How can I solve this problem?
SOLVED
Solution:
a.add_file(dosya,"filename",nr=0)
that automatically searches type=file inputs and adds my file to first one(nr=0 provides it)
New Problem
After I sending POST data (or I think it sends)
This page comes as a response;
<?xml version='1.0' encoding='utf-8'?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="ImageBam.com" />
<meta name="description" content="Free Image Hosting and photo sharing. Create an online album with bulk upload tools and share with family and friends." />
<meta name="keywords" content="image hosting, free image hosting, photo sharing, upload photo, free photo gallery, photo host, image gallery" />
<meta name="robots" content="follow" />
<meta name="revisit-after" content="1 days" />
<meta property="fb:admins" content="3433880" />
<link rel="stylesheet" href="http://www.imagebam.com/style.css" type="text/css" />
<link rel="shortcut icon" href="http://www.imagebam.com/favicon.ico" />
<title>Fast, Free Image Hosting - ImageBam</title>
<script type="text/javascript" src="http://www.imagebam.com/JS/imagebam.js"></script>
<script type="text/javascript" src="http://www.imagebam.com/JS/pt.js"></script>
</head>
<body>
<!-- IMAGEBAM HEADER -->
<div class="scrollme">
<div class="abody">
<!-- everything -->
<div class="banner cursor" style="float:left;" onclick='top.location="http://www.imagebam.com"'></div>
<div style="float:right; text-align:right; border:0px solid #f2f2f2; border-top:none; padding-top: 5px; padding-left:3px; padding-right:10px;">
</div>
<div style="clear:left;"></div>
<div class="dtab">
<ul>
<li class="inactive">Multi-Upload</li>
<li class="inactive">Zip-Upload</li>
<li class="inactive">Basic Upload</li>
<li class="inactive">Learn More</li>
<li class="inactive">FAQ</li>
<li class="inactive">Register</li>
<li class="inactive">Login</li>
<li class="inactive">Premium</li>
</ul>
</div><br />
<!-- Google Code for Imagebam Uploaded Image Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
function img404(ID,fsrc){
document.getElementById('thumb_404_info').style.display="block";
document.getElementById("img_"+ID).style.display = "none";
document.getElementById("alt_"+ID).style.display = "inline";
setTimeout("reloadImg("+ID+",'"+fsrc+"')", 500);
}
function reloadImg(ID,fsrc){
mrand = Math.random();
document.getElementById("img_"+ID).style.display = "inline";
document.getElementById("alt_"+ID).style.display = "none";
document.getElementById("img_"+ID).src = fsrc+"?"+mrand;
}
/* ]]> */
</script>
<div class="box_wait" style="text-align:center; display:none;" id="thumb_404_info">Thumbnails that are being processed in the background might not load right away.<br /></div>
<div style="text-align:center; margin-bottom:5px;">
<b>NEW!</b> VideoBam.com (HD Video Hosting)
</div>
<fieldset><legend><img src="/img/icons/photos.png" alt="" style="vertical-align:middle; line-height:16px; height:16px; padding-right:5px;" /> All at Once</legend>
<table style="width:100%;"><tr>
<td>
<b>BB-Code</b><br />
<textarea onclick="this.select();" style="width:300px; height:200px;"></textarea>
</td>
<td>
<b>HTML-Code</b><br />
<textarea onclick="this.select();" style="width:300px; height:200px;"></textarea>
</td>
</tr>
</table>
</fieldset>
<!--
<fieldset><legend style='color:green;'><img src='/img/icons/new.png' alt='' style='vertical-align:middle; line-height:16px; height:16px; padding-right:5px;'> NEW! ImageBam Remote Upload Widget</legend>
<b>Webmasters / Mods!</b><br> Allow your users to upload images to ImageBam <b>without leaving your website or forum!</b><br> Add our new ImageBam Remote Upload Widget to you website!<br>
Please spread the word! Thank you!
</fieldset>
-->
<div style="text-align:center; margin-bottom:5px;">
<b>NEW!</b> VideoBam.com (HD Video Hosting)
</div>
<fieldset><legend><img src="/img/icons/delete.png" alt="" style="vertical-align:middle; line-height:16px; height:16px; padding-right:5px;" /> All Removal Links</legend>
Do not share the links below. You can use them to delete the photos you have uploaded.<br />
<textarea onclick="this.select()" style="width:600px; height:200px;"></textarea>
</fieldset>
<!-- Google Code for Imagebam Uploaded Image Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1068053810;
var google_conversion_language = "en_US";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "6tqpCPa-chCy6qT9Aw";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1068053810/?label=6tqpCPa-chCy6qT9Aw&guid=ON&script=0" />
</div>
</noscript>
</div>
<div class="footer">
<a class="footera" href="http://www.imagebam.com/">ImageBam</a> | <a class="footera" href="/remote-upload-widget">Remote Upload Widget</a> | <a class="footera" href="http://www.imagebam.com/screengrab_upload_firefox_extension">screengrab tool</a> | <a class="footera" href="http://www.imagebam.com/terms-of-service">terms of service</a> | <a class="footera" href="http://www.imagebam.com/frequently-asked-questions">help</a> | <a class="footera" href="http://support.imagebam.com" target="_blank">support forums</a> | <a class="footera" href="http://code.google.com/p/imagebam-api/">API for developers</a> | <a class="footera" href="http://www.imagebam.com/report-abuse">report abuse</a>
<div style="height:35px; overflow:hidden;">
<div id="google_translate_element" style="margin-top:9px;"></div><script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript"></script>
</div>
<div style="text-align:center; color:#999; margin-top:10px;">
<table style="margin:auto;"><tr><td><img src="http://1.imagebam.com/static/img/tux.png" alt="tux" /></td><td>Powered by dedicated Linux servers. Flixya Entertainment, LLC © 2010</td></tr></table>
</div>
</div>
</div>
<div id="updater_index"></div>
<script type="text/javascript">
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2424497-2";
urchinTracker();
</script>
</body>
</html>
Normally, it is the after-uploading page that comes out with image's links etc.
But I think there is a dynamic process, because the links were not prepared when I got the page.
Am I missing something? because even if you dont fill the inputs on form, if you submit() it, it redirects you to that after-uploading page..
Use select_control() also with nr=0 to select the first file.