This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Puppeteer cheat sheet | |
// gonna try and do for puppeteer what capybara got: https://gist.github.com/zhengjia/428105 | |
// to delete an input value | |
function DeleteInput(page, inputSelector, word){ | |
// input must be focused | |
page.type(inputSelector, '') | |
for (let i = 0; i < word.length; ++i) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://stackoverflow.com/questions/49070708/how-to-pass-queue-to-basehttpserver | |
import multiprocessing | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from io import BytesIO | |
class QueuingHTTPServer(HTTPServer): | |
# def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True, queue=False): | |
def __init__(self, server_address, RequestHandlerClass, queue, bind_and_activate=True): |