I am trying to upload image to web site via upload box
but the problem is that upload box does not accept any values
any try to send image to that upload box just opens it but can not send image path to it
how to deal with windows download box
You should first inspect the page (F12) and identify the xpath of the input webElement (could be something like this: //div[#id='input_field']).
Then you should use the selenium keyword 'choose file(locator,file_path)'.Selenium Keywords
I see that you also mentioned 'download box' in your question,if you have another question about that please create another question and I could answer it.
Wait Until Element is Enabled //button[#id='upload1btn']
Choose File //button[#id='upload1btn'] path_to_file
#COMMENT: DO NOT FORGET IMPORT OF SELENIUM LIBRARY
Related
I am working on blog like web project using lexical editor in nextjs.
I am trying to implement image plugin in lexical editor. For now it coverts to base64 format which will be expensive for storing in database. Instead of storing base64 I want to store the image link along with other text inside database. Also I am facing issue to implement image plugin of lexical editor in nextjs.
steps I want to follow
I want to upload image in aws s3 and then want to show in editor as image.
Another way I am trying to implement like a modal will open where image can be selected
and it uploads to aws s3 and gets image url, then want to show image url in editor.
Is there any solution for it?
Thanks in advance for any suggestion
How to directly download and save a file by button click using Splash Lua?
Example page and the download button:
Conditions:
The download URL is generated dynamically upon button click
Clicking the button will open a "Save As" prompt window to save the Excel file
I am using a Splash docker service on localhost:8050. I write Lua script directly on the page.
I have searched the official docs about binary download, but the closest things I have managed to find were html:jpeg, html:png and response.body, which didn't quite seem to hit the mark. I also found no explicit examples or tutorials on Youtube.
Note: Please do not give workarounds such as using Selenium. I am only interested in how to do it with Lua.
I am working in Spyder and would like to record the console output as either a html or pdf file. Currently the only way to achieve this is to right click on the console window and then choose 'save as'.
The problem with this approach is that the file path needs to be specified manually. It would be much more desirable to be able to set the working directory in the code and then save the pdf or html automatically to this location. Is this possible?
Or if this is not possible, is there any code that when the 'save as' option is right clicked, the file browser is opened on the current working directory?
(Spyder developer here) My answer:
Or if this is not possible, is there any code that when the 'save as' option is right clicked, the file browser is opened on the current working directory?
We can implement this in a future release. Please open an issue in our issues tracker so we don't forget to do it in the future.
My Edge extension creates PDF files. What's is the best approach to provide a download capability for these files in my extension? I tried:
window.navigator.msSaveOrOpenBlob()
create link dynamically and assign data URI to the HREF field
this approach: http://html5-demos.appspot.com/static/a.download.html
None of these ways seem to work. The "Downloads" API is not available at the moment. Using the Flash script to download the file is not the best solution (it requires Flash to be enabled).
Ideal scenario is: user clicks a "Download" button, and a "Save as" dialog appears. So how do I do that in my Edge extension?
In cxGrid i have a column which is "Image" type.(properties=Image,GraphicClassName=TJpegImage).
To the PopUpMenuLayout - MenuItems I have added a CustomMenuItem called "Open With...".
How can I implement this custom menu item so that it opens my underlying image with Paint (windows Paint)? Or at least trigger the "Open with.." windows dialog.
If you have your image stored in a database then you will first have to save it into image file on your computer.
Then you can then simply use ShellExecute for opening this image with default image viewing/editing program. ShellExecute works basically the same as if user would have double-clicked on your file. The problem is that usually doublec-licking on image file opens a preview of it so if you need to edit that image using of ShellExecute might not be the best way.
Now in order to be sure that the image is opened for editing rathen than just in preview you would have to read windows registry to get information about which program is used for viewing and editing of that specific image format and then use CreateProcess API cal instead.
You could also make sure that image is opened with specific program by starting that program using CreateProcess API call and passing image location as startup parameter (most image editing programs treat first parameter as file to open upon startup