Integration layer between Requests and Selenium for automation of web actions

Requestium is a python library that merges the power of Requests, Selenium, and Parsel into a single integrated tool for automatizing web actions.

The library was created for writing web automation scripts that are written using mostly Requests but that are able to seamlessly switch to Selenium for the JavaScript heavy parts of the website, while maintaining the session.

Requestium adds independent improvements to both Requests and Selenium, and every new feature is lazily evaluated, so its useful even if writing scripts that use only Requests or Selenium.

Features

  • Enables switching between a Requests’ Session and a Selenium webdriver while maintaining the current web session.
  • Integrates Parsel’s parser into the library, making xpath, css, and regex much cleaner to write.
  • Improves Selenium’s handling of dynamically loading elements.
  • Makes cookie handling more flexible in Selenium.
  • Makes clicking elements in Selenium more reliable.
  • Supports Chrome and PhantomJS.

https://github.com/tryolabs/requestium

Advertisements

All the fundamental React.js concepts, jammed into this single Medium article

This article is not going to cover what React is or why you should learn it. Instead, this is a practical introduction to the fundamentals of React.js for those who are already familiar with JavaScript and know the basics of the DOM API.

All code examples below are labeled for reference. They are purely intended to provide examples of concepts. Most of them can be written in a much better way.

https://medium.freecodecamp.org/all-the-fundamental-react-js-concepts-jammed-into-this-single-medium-article-c83f9b53eac2

Getting Started with Headless Chrome

TL;DR

Headless Chrome is a way to run the Chrome browser in a headless environment. Essentially, running Chrome without chrome! It brings all modern web platform features provided by Chromium and the Blink rendering engine to the command line.

Why is that useful?

A headless browser is a great tool for automated testing and server environments where you don’t need a visible UI shell. For example, you may want to run some tests against a real web page, create a PDF of it, or just inspect how the browser renders an URL.

https://developers.google.com/web/updates/2017/04/headless-chrome

You (probably) don’t need a JavaScript framework

I’m not going to post yet another rant about “Why the JavaScript community is so bad” or anything like that, because I don’t feel that way. I’d much rather show you that it’s actually pretty simple and surprisingly fun to do things from the ground-up by yourself and introduce you to how simple and powerful the Web API and native DOM really is.

For the sake of simplicity, let’s assume your everyday framework is React but if you use something else, replace React with X framework because this will still apply to you too.

https://slack-files.com/T03JT4FC2-F151AAF7A-13fe6f98da

curl-to-Go

“This tool turns a curl command into Go code. (To do the reverse, check out sethgrid/gencurl.) Currently, it knows the following options: -d/–data, -H/–header, -I/–head, -u/–user, and -X/–request. It also understands JSON content types. As always, be sure to go fmt your code and pay attention to imports. There’s probably bugs; please contribute on GitHub! For a quick way to generate a Go struct from JSON, see JSON-to-Go…”

https://mholt.github.io/curl-to-go/