07-28-2017 03:35 PM
Hey guys,
I´m currently working on an application that gives the user the opportunity to select images from google and download them. My idea is that the user types in an object he wants to search for. The application searches for that object. Then all the google images are displayed one after another and the user can click to download the image or not.
So, my first step was to create a .NET web browser and navigate to google image, type in the object name which the user likes to search for and click the search button. After that, I get the URL of the first image shown by google and navigate to it. Afterwards I programmatically click the "next" button every time the user clicks "download" or "not download". In the current version of the application, the images are switched every second just to test the functionality.
Now the problem is that clicking the search button after typing in the object name does not work all the time. My guess: When clicking the search button, I use the same document reference then before writing to the search field. So I´m searching for an empty string. But like mentioned - sometimes it works. I furthermore could not find any .NET event or property to wait until the document is updated before I click the button. Has anyone any idea what I´m doing wrong? I´m absolutely new to .NET. I´ll attach a snipped of my VI. I know I should close all the references and so on but this is just a test VI.
Solved! Go to Solution.
07-28-2017 03:50 PM
By the way - I tried doing the same thing with activeX instead of .NET. Same behaviour. Writing to the search field and clicking the button work perfectly until I try to do both in a row.
07-28-2017 05:54 PM
The VI snippet is broken for me. Can you just attach the whole VI as a file, as well as attaching the snippet as a file (i.e. not in-lining as an image)
There's a notice at the top of the board indicating they know that snippets are having issues at the moment.
07-29-2017 03:52 AM
Off course, Kyle. Thank your for the hint! You´ll find the files attached.
07-30-2017 04:28 AM
I totally forgot. You will also need this SubVI
08-05-2017 06:25 AM
Has no one any idea?
08-05-2017 07:24 AM
I got it to work. If I use another google image page as starting page, it works great. I´ll attach the VIs.