You can translate the question and the replies:

How to Save Image without having to navigate to the Images URL

Hello, I am trying to save an image from a page without needing to Navigate to the Image URL. Every time I navigate to the image URL the image changes. When I attempt to scrape the page using the 'Click And' function and then select "Save" to save the image I am not receiving a dialog box on where to save the image until after selecting another portion of the page that will refresh the page completely changing the image. Even if I cancel next navigation I am still receiving the error message "Error saving file ~ ERROR: The HTTP redirect request failed." or "Script error code 6: Sequence error. ERROR: The HTTP redirect request failed" I need to be able to save the image such as "Save as" and to a location without having to navigate directly to the image which would refresh and change the image when navigating to it. Below is the code used: I have tried various methods of Finding the Element by Xpath and href and both receive the same errors. AllowOpenNewWindows(true); Navigate(http://www.parmamunicourt.org/,0); ExtendedWaitPages(-1); FindElementByText(A,regex:\\\\s*Case\\\\s*Search\\\\s*,0,true); FireEventOnSelectedElement(onmousemove>onmouseover>onmousedown>onmouseup>onclick); ExtendedWaitPages(-1); FindElementByText(A,regex:\\\\s*ACCEPT\\\\s*and\\\\s*ENTER\\\\s*,0,true); FireEventOnSelectedElement(onmousemove>onmouseover>onmousedown>onmouseup>onclick); ExtendedWaitPages(-1); FindElementByText(A,regex:\\\\s*a\\\\s*Traffic/Criminal\\\\s*Case\\\\s*,0,true); FireEventOnSelectedElement(onmousemove>onmouseover>onmousedown>onmouseup>onclick); ExtendedWaitPages(-1); FindElementByAttribute(FORM,name,AdvancedSearchForm,0,true); FindChildElementByAttribute(INPUT,name,txtLastName,0,true); SetValue(^EncodeSeq(@LastName)); FireEventOnSelectedElement(onkeydown>onkeypress>onkeyup>onchange,true); FindElementByAttribute(FORM,name,AdvancedSearchForm,0,true); FindChildElementByAttribute(INPUT,name,txtFirstName,0,true); SetValue(^EncodeSeq(@FirstName)); FireEventOnSelectedElement(onkeydown>onkeypress>onkeyup>onchange,true); FindElementByAttribute(FORM,name,AdvancedSearchForm,0,true); ExtendedWaitPages(-1);AllowOpenNewWindows(true); SetSilent(0); CancelNextNavigation(); FindElementByXPath(//FORM[\@action = "searchdocket_p.asp?pageId=32"]//TABLE//TBODY//TR[4]//TD[2]//IMG[\@src = "http://www.parmamunicourt.org/aspsigv3b1/captcha.asp"]); SaveFile(testfileimage.bmp,\\\\testfolder);
User
11-10-2016 13:11:42 -0400

1 Answer

Hi, I think there is a way to save the image if the URL of the image is already known by using these two commands in your sequence: SetTargetURL(@FILE_PATH); SaveFile(@FILE_NAME,@FOLDER_NAME); This would create the file in the specified folder with the file name. Also, I would read the section “SETTARGETURL” in NSEQL Manual of ITPilot to know more about this command. Hope this helps!
Denodo Team
12-10-2016 16:46:22 -0400
You must sign in to add an answer. If you do not have an account, you can register here