Python Method Chaining Javascript Console Commands