Build the future of communications.
Start Building for Free

Playwright posts

  • By Néstor Campos
    How to test web applications with Playwright and C# .NET Test web apps with Playwright and C# .NET

    Testing your applications is a fundamental part of any project, whether it is to find errors during development, or to verify the expected behavior of your application in each action that a user may or may not execute.

    In this post, you are going to use a simple form and test it using Playwright and C# to verify its operation with both correct and incorrect information, simulating the actions of users.

    Prerequisites

    You will need the following for your development environment:

    Test types

    You can create different types of tests to verify your software:

    • Unit tests test individual methods and functions of the classes, components, or modules your software uses.
    • Integration tests verify that …
    Read More
  • By Sam Agnew
    Automatisierte Skripterstellung für Headless Browser in Node.js mit Playwright Automatisierte Skripterstellung für Headless Browser in Node.js mit Playwright


    Hallo und Danke fürs Lesen! Dieser Blogpost ist eine Übersetzung von Automated Headless Browser scripting in Node.js with Playwright. Während wir unsere Übersetzungsprozesse verbessern, würden wir uns über Dein Feedback an help@twilio.com freuen, solltest Du etwas bemerken, was falsch übersetzt wurde. Wir bedanken uns für hilfreiche Beiträge mit Twilio Swag :)

    Manchmal sind die Daten die wir benötigen online verfügbar, allerdings nicht über eine öffentliche API. Web Scraping kann in solchen Fällen hilfreich sein, allerdings nur, wenn die Daten über eine Webseite statisch verfügbar sind. Entwickler haben das Glück, dass alle Aufgaben, die sie manuell im Browser durchführen, mithilfe von Playwright automatisiert werden können. Playwright ist eine Node-Bibliothek, die vom gleichen Team entwickelt wurde wie Puppeteer und die eine High-Level-API zum Automatisieren von Aufgaben in verschiedenen Browsern bietet.

    Ich zeige nun, wie wir mithilfe von Playwright programmgesteuert mit Webseiten interagieren können. Wir verwenden in diesem Beispiel das Tool Native …

    Read More
  • By Sam Agnew
    4 Ferramentas para fazer extração de dados em Node.js 4-ferramentas-web-scraping-in-node-js.png

    Algumas vezes, os dados que você precisa estão disponíveis online, mas não através de uma API REST. Felizmente, para desenvolvedores JavaScript, existem uma variedade de ferramentas disponíveis em Node.js para extrair e analisar dados diretamente dos websites e usar em seus projetos e aplicativos.

    Vamos abordar 4 dessas bibliotecas para ver como elas funcionam e as diferenças entre elas.

    Make sure you have up to date versions of Node.js (at least 12.0.0) and npm installed on your machine. Run the terminal command in the directory where you want your code to live:

    Certifique-se de que você possui versões atualizadas do Node.js (pelo menos 12.0.0) e npm instaladas na sua máquina. No diretório que seu código será instalado execute no terminal o comando a seguir:

    npm init --yes
    

    Para algumas dessas aplicações, vamos usar a biblioteca Got para fazer chamadas HTTP, então instale isso com o comando a seguir no …

    Read More
  • By Sam Agnew
    4 Tools for Web Scraping in Node.js Copy of Generic Blog Header 3 (2).png

    Sometimes the data you need is available online, but not through a dedicated REST API. Luckily for JavaScript developers, there are a variety of tools available in Node.js for scraping and parsing data directly from websites to use in your projects and applications.

    Let's walk through 4 of these libraries to see how they work and how they compare to each other.

    Make sure you have up to date versions of Node.js (at least 12.0.0) and npm installed on your machine. Run the terminal command in the directory where you want your code to live:

    npm init --yes
    

    For some of these applications, we'll be using the Got library for making HTTP requests, so install that with this command in the same directory:

    npm install got@11.0.2
    

    Let's try finding all of the links to unique MIDI files on this web page from the Video Game Music Archive with a …

    Read More
  • By Sam Agnew
    Automated Headless Browser scripting in Node.js with Playwright Copy of Language template - GENERIC3 (3).png

    Sometimes the data you need is available online, but not through a public API. Web scraping can be useful in these situations, but only if this data can be accessed statically on a web page. Fortunately for developers everywhere, most things that you can do manually in the browser can be done using Playwright, a Node library built by the same team that made Puppeteer which provides a high-level API for automating various browsers.

    Let's walk through how to use Playwright to interact with web pages programmatically. In this example we'll use the Native Land Digital tool, an awesome project built to teach people more about their local indigenous history. In this case, an API does exist, but it only takes location data in the form of geo-coordinates rather than a more user-friendly address. We'll write code to programmatically type an address and figure out which Native land corresponds …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.