[chromedriver] Avoid using instanceof since it does not work as expected in subframes.
[chromedriver] Avoid using instanceof since it does not work as expected in subframes.

BUG=chromedriver:1276
TBR=stgao@chromium.org

Review URL: https://codereview.chromium.org/1530183008

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#366186}

axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk