How to take screenshot of each link clicked in Selenium IDE - selenium-ide

I want to click links in a webpage by storing it in array and click this links one after another and take entire screenshot of each and every link after clicked,and all this i have to do only in SELENIUM IDE...how to do that??
I know up to save links in array and clicking links, but failed to capture screenshot of each page after clicking..because it is taking only one screenshot and overwriting that screenshot when second link clicked..

Maybe the reason why your screenshots are being overwritten is because you have a consistent image file name for them. Try something like this:
Command:
captureEntirePageScreenshotAndWait;
Target:
C:\\<Directory>\\different-filename-for-screenshot.png
and so on and so forth...

If you have very less screens to capture then you can simply capture them in different file names. Please refer example below.
LessScreenshot IDE Script
LessScreenshot Files stored
If you have more screens to capture then you can read the file locations and names from CSV file. For more information about loop and readCSV, please refer this link. In the example below, I have capture 7 clicks screenshots.
Input_CSV_File
IDE_Script_Loop&ReadCSV
Screenshot captured

Related

How do I select text from a scanned photo?

I'm in the process of writing an app with which you can take a picture of a text and then the text is scanned and transferred to a variable. I've done that with the plugin firebase_ml_vision and everything works.
The problem I have is that I want to decide for myself which text is scanned from the photo. For example, this could work in such a way that each word and number is automatically given a frame and the user then taps the words that are transferred to the variable. This also works with Google translator (see screenshot) but unfortunately I haven't found anything yet how to do it... Do you know how it works?
The firebase-mlkit's text recognition API returns a frame as well as cornerPoints for each of the VisionTextBlock, VisionTextLine, and VisionTextElement:
https://firebase.google.com/docs/reference/swift/firebasemlvision/api/reference/Classes/VisionTextBlock
They should help you to select the words, lines, or text blocks.

Manage image deletion in a WYSIWYG editor

When an HTML editor is used and images are added from the local computer, they are uploaded to a server and a link is obtained to put it in the image src attribute. What happens when the img element is removed from the editor? How would the image be deleted from the server? In this case I understand that the image deletion event could be detected and then call a service to delete it. But what happens if the user adds a new image and leaves the page? How would it be deleted in these cases?
In both cases, if the deletion of the images is not managed, it could happen that the server is filled with unused images. How do you usually solve this problem? How is the proper way to solve this?
That's a nice question there. And yeah, for sure the server would fill up with unused images in some point. I'm not an expert on this but I'll try to suggest something so I can implement it too in my WYSIWYG editor haha. I suppose you have a custom modal for the insertion of the image. Upon clicking the button you could save the image link to an array and at SAVE || on leaving the document edit || on popstate event you could make a regex that checks the innerHTML of the editor for the specific SRC. If is not found then you could push an ajax request with the image name so you can deleteit. For sure there are more efficient and complex ways to achieve that. Such as creating text ranges and track elements on keydown - Backspace(8) / Deletekey(46).
An other way is that you could track the images that are in use. When the document is saved regex out the images in the document, push them to a db table and periodically make a check from the back end so you can delete those that are not in use.
I don't know if my suggestions are helpful or not. I just saw an interesting subject so I jumped in. Cheers mate.

How do I display data/information with Matlab App Designer?

I would like to display some information to the user via Matlab App Designer's GUI. I am new to this program and can't seem to find a widget that provides what I feel should be a simple function. Am I missing something? Examples would include showing the user:
The path of the file that he/she selected
Errors such as "No files detected" that are printed in a Matlab script called on by the GUI code.
Other print statements in code such as "Done!", etc that will inform the user when a process is complete.
Is there a way to capture the output in the Matlab command line and report these in a window of some sort in the GUI? Thanks in advance!
You can use a TextArea to display information for the user. Here's how I made a simple example:
Drag a button to the app in design view.
Drag in a text area also. I changed the label to Feedback.
Select the button and use the Callbacks tab in the bottom right of app designer to add a callback with the default name it gives you.
Edit the callback to contain
answer = 'what your want to display';
app.FeedbackTextArea.Value = answer;
When you push the button the text area gets filled. In your code, instead of just setting 'answer' to some string, set a variable using whatever code is dealing with your user's information. The key is to store what you want the user to see in a variable and then assign that to the "Value" parameter of the text area or other widget where you want them to see the results.

How to make file clickable in upload collection?

I am doing upload collection component in sap ui5. I want to make file clickable after upload. Previously uploaded files are getting clickable but currently uploaded files are not getting clickable. Please help me to find solution.
Below is my XML code :
You have not set the mode for the Upload list, by default this is set to None. Add a mode parameter in you List as below. This will make the List clickable.
mode="SingleSelectMaster"
Reference:
https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.m.UploadCollection.html#getMode
https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.m.ListMode.html

iPhone sdk how to retrieve the Table of Contents from PDF file?

I am using VFR reader to display my pdf's. I need to extract the Table of Contents on a button click and display it in a tableview then it should lead to the respective pages while tapping on each.I googled for this and got these links
Create a table of contents from a pdf file
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-adding-a-table-of-contents-to-an-ipad-reader/
And i came to know that, to get TOC we must use "CGPDFDocumentGetCatalog(pdf doc)". But in my reader that "CGPDFDocumentGetCatalog(pdf doc)" is not at all getting called. Now how can i extract my TOC from my pdf file? Kindly help me out of this. I am struggling on this for a week. Thanks in advance.
Unfortunately I think the two answers you refer to point to different implementation strategies, which are both possibly valid but are different.
The first question is what the PDF files you have and want to show in your app look like. There is no such thing as a predefined TOC object in a PDF file, there are simply different ways to emulate this. The two most common ways are:
A) Bookmarks, which are a way to add little pieces of text to a structured tree, where each piece of text points to a specific location in the PDF file. These bookmarks can be added in the design application or later (there are specific tools to do so) and they can implement whatever structure.
B) Your PDF file might contain something that looks like a classic TOC from a book, which is basically just text on the opening pages, optionally with hyperlinks to specific locations in the book.
The second link you refer to shows how to create user interface where you can show the TOC in. The remaining question then is to figure out what items you want to display in the TOC window. In this second link you point to, the solution presented is to provide hard-coded items specific to one specific book. Of course this approach is not very useful when you want to display just any book.
So the question you are left with is how to figure out what items to display and where they link to.
If you consider my possibility A) above: a PDF file with bookmarks, the answer could be relatively simple. Answer 1 you point to explains how to look at the different structures inside a PDF file - bookmarks are simply such a structure (Defined in section 12.3 of the PDF specification: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf)
This means you could use the techniques shown there to walk the different objects in the PDF file, and find each bookmark. The bookmark will give you the text to display and the actual location in the PDF file that text should jump to when clicked.
If you consider my possibility B) above: a PDF file without bookmarks but a classic TOC, this will be much harder to solve. Such table of contents are simply text on one or more pages, optionally with hyperlinks. Of course you could try to find all text on these pages (if you can figure out on which page the TOC starts and ends), but you'd then also have to figure out where that item links to. If there are no hyperlinks involved, that would be a daunting task.
So your first question should be how generic you want to solve this problem. Do you know which PDF files you'll want to display? Can you devise a TOC for these files yourself (as in your solution 2)? If not, can you be sure all PDF files contain bookmarks? The answer to those questions will largely determine the rest of your strategy...