clearVariables

void session.clearVariables ( Map variables ) (professional and enterprise editions only)
void session.clearVariables ( Collection variables ) (professional and enterprise editions only)

Description

Clears the value of all session variables that match the keys in the Map. This will ignore a key of DATARECORD.

This method is provided using a Map or Collection rather than a List or Set to work easier with the setSessionVariables method.

Parameters

  • Map The map to use when clearing the session variables.
  • Collection The collection to use when clearing the session variables.

Return Value

This method returns void.

Change Log

Version Description
5.5.29a Available in all editions.
5.5.43a Changed from session.removeSessionVariablesInMap to session.clearVariables.

Examples

Clear the ASPX values for a .NET site after scraping the next page

 DataRecord aspx = scrapeableFile.getASPXValues();
 
 session.setSessionVariables(aspx);
 session.scrapeFile("Next Results");
 session.clearVariables(aspx);