void runnableScrapingSession.setVariable ( String identifier, Object value ) (professional and enterprise editions only)


Set the value of a session variable.


  • identifier Name of the variable, as a string.
  • value What to store in the variable: object, boolean, int, string, etc.

Return Values

Returns void.

Change Log

Version Description
4.5 Available for professional and enterprise editions.


Set Session Variable

 runnableScrapingSession = new com.screenscraper.scraper.RunnableScrapingSession( "My Session" );

 // Sets the session variable "LOGIN_USERNAME" with the value
 // "my_username".
 runnableScrapingSession.setVariable( "LOGIN_USERNAME", "my_username" );

 // Start the scrape

See Also

  • getVariable() [RunnableScrapingSession] - Retrieves the value of a session variable from the scraping session