import express from 'express'; import * as path from 'path'; import * as assert from 'assert'; import * as http from 'http'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver, By, Key } from 'selenium-webdriver'; const newApp = () => { let app = express(); app.get('/', (_req, res) => { res.send(` hello `); }); app.get('/follow-input', (_req, res) => { res.send(` `); }); app.get('/area', (_req, res) => { res.send(` `); }); /* * test case: link2 is out of the viewport * +-----------------+ * | [link1] |<--- window * | | * |=================|<--- viewport * | [link2] | * | | * +-----------------+ */ app.get('/test1', (_req, res) => { res.send(`
link1
link2
`); }); /* * test case 2: link2 and link3 are out of window of the frame * +-----------------+ * | +-----------+ | * | | [link1] | | * |=================| * | | [link2] | | * | +-----------+ | * | | * +-----------------+ */ app.get('/test2', (_req, res) => { res.send(`