I am having a similar problem as @goMiddleton. Namely, I am interacting with a Web site where I can fill a form with criteria directly from the Panorama database, submit it and scrape the resulting web page for the data the form returns.
The problem is when I use Panorama to analyze these results I have two outcomes … either “good” results requiring no further data acquisition from the site (for that record), or “bad” results which require a re-query of the site with different criteria. In the latter circumstance I have programmed Panorama to automatically resubmit the form with alternate criteria but I can no longer get the updated page’s source code from the Browser object to scrape the new results.
I was hoping that this was a timing issue, where Panorama was not waiting for the webpage to completely load prior to executing subsequent commands, so I wrote several applescripts that control Safari (since it uses WebKit too) and which do the same process as described above. By using the appleScript “delay” command, I was able to make the re-query work and subsequently scrape the updated data which I previously could not do in Panorama.
Of interest, I created a loop in Panorama using info(“millisecond”) to simulate a delay, but this did not solve the problem. I also attempted to use a timer to try to achieve the same effect and it also did not create the desired delay.
Is there a way to make this work … to make Panorama wait for a Browser’s webpage to finish loading or to recognize/return the reloaded web page’s source code?
I’d be happy to provide both my database and the AppleScripts to you, Jim, if you think that’d be worthwhile.
I guess I could use Panorama’s ability to execute AppleScript to accomplish this task, but it would be much more satisfactory to complete this project without having to leave Panorama, especially since seeing the web site in the Browser object is useful to the end user of this project.