Automatic reverse engineering of interactive dynamic web applications to support adaptation across platforms