• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Missing output files after running task iteratively

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I am using Selenium WebDriver to perform some webscraping. Based on the website URL given by the user, Selenium will bring up the website, and take a screenshot.

I've also added an interval feature, such that every 1 minute or whatever timing the user has selected, the script will re-visit the website again and take a screenshot.

All these output are saved to a directory specified by the user.

The first time round I run it is fine. I received my screenshot in the directory I specified.
After 1 minute, the script will start up again and everything seems to be running normally, but the directory is missing the additional screenshots.

What am I missing here?



I'm using the NetBeans GUI Builder for my form.

 
Marshal
Posts: 5409
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any errors in your log?
 
Shachen Han
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, the logger isn't throwing any errors.
 
Marshal
Posts: 76462
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
… and welcome to the Ranch

Moving thread as too difficult for this forum.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you'll find that you are getting the screen capture, but it's overwriting the previous file. Consider for a moment; how often is your datetime String changing?
 
lowercase baba
Posts: 13073
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never be afraid to increase logging. Why not have it write to the log file something like this every time you save a file:

2015-10-07 08:00:00 - Saving file <print the full path and file name here>

Then you can see if you are overwriting the same file each time or not.
 
Shachen Han
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:… and welcome to the Ranch

Moving thread as too difficult for this forum.



Glad to be here


J. Kevin Robbins wrote:I think you'll find that you are getting the screen capture, but it's overwriting the previous file. Consider for a moment; how often is your datetime String changing?



You're right, I can't believe I overlooked that... It works fine now that I placed it into my method. Thanks for the help!

 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you fixed it! Always keep your variable scope as limited as possible.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic