python

Selecting a specific element in Selenium

Selecting a specific element in Selenium

In previous article Waiting for an element to be displayed using the WebDriverWait in Selenium, WebDriverWait is used to prevent the browser from performing the following actions until the condition is satisfied. This time, I will introduce you how to select HTML elements that can also be used in WebDriverWait. Selection with id attribute First of all, I introduce the most common way to specify the id attribute. The id
Python string concatenation: + operator/join function/format function/f-strings

Python string concatenation: + operator/join function/format function/f-strings

This time, I will introduce the method of string concatenation in Python. Here, the Python version is assumed to be 3.x. Concatenate with ‘+’ operator The simplest way is string concatenation using the + operator. Some programming languages ​​don't support string concatenation with the + operator, but Python has no problem. 1a = 'aaa' 2b = 'bbb' 3c = 'ccc' 4txt = a +
Use Range function in Python

Use Range function in Python

Python has more utility function implementations than other programming languages. This time, I will introduce the for statement processing using the Python range() function. Environment I have confirmed the operation in the following environment. Python 3.8 range() function is A range () is a Python built-in function used to create a sequence of numbers and mainly used in combination with the for statement. Takes several arguments to control the rules
Autocomplete your code in Jupyter Notebook

Autocomplete your code in Jupyter Notebook

Jupyter Notebook is often used as a Python development environment, but code completion is not enabled by default. That's why it's a bit of a problem when importing packages. This time, I introduce some tips for code completion in Jupyter Notebook. Autocomplete the code Code completion in the IDE is an important feature for smooth implementation of the program. Some people call it autocomplete , and others call it intelli
Waiting for an element to be displayed using the WebDriverWait in Selenium

Waiting for an element to be displayed using the WebDriverWait in Selenium

In a previous article Avoiding pop-up blocking when opening multiple Firefox tabs simultaneously in Selenium, I presented tips on running Selenium in Firefox. In this article, I will show you some tips for writing Selenium code. Selenium works faster than people. Selenium is fast, but it's easy to overlook waitting when writing code that works with Selenium. The browser communicates and draws the screen when some event is triggered, such
Avoiding pop-up blocking when opening multiple Firefox tabs simultaneously in Selenium

Avoiding pop-up blocking when opening multiple Firefox tabs simultaneously in Selenium

In previous article Set up the Selenium Webdriver. Let's automate with Python! , I introduced the procedure to build Selenium execution environment in Python. In this article, I would like to introduce a problem I actually ran into when opening multiple URLs in different tabs at the same time in Firefox and how to deal with it. What I originally wanted to do Open multiple URLs (about 100) at the
Set up the Selenium Webdriver. Let's automate with Python!

Set up the Selenium Webdriver. Let's automate with Python!

These days, even non-programmers are increasingly doing programming. That's a good thing. Particularly popular with them is the automation of their work using the programming language Python. This means that we can use programs to simplify routine tasks that were previously done by hand. I've been getting a lot of needs (or rather questions) about running Selenium in Python, so I've decided to document them. Goals Set up the Selenium
HTTP requests in Python3 with Requests library

HTTP requests in Python3 with Requests library

In past article “HTTP requests in Python3 with urllib.request module", I wrote simple code samples for HTTP requests with urllib.request module which is a package in Python. In this article, I introduce Requests. What is Requests Requests is a package for HTTP request. Requests is a human readable package for HTTP request with wrapping urllib. It has a simple interface and supports lots of feature as follows. International Domains and
HTTP requests in Python3 with urllib.request module

HTTP requests in Python3 with urllib.request module

In this article, I introduced how to use urllib.request module to request with HTTP in Python. Environment Runtime environment is as follows. python 3.7 Ordinal HTTP request HTTP GET request with an Request object Use Request object included in urllib.request module. Create Request object instance as follows. 1from urllib.request import * 2 3req = Request(url='https://docs.python.org/ja/', headers={}, method='GET') Access to Request object property. You can see the host information and path
Use PyPDF2 - which PyPDF 2 or PyPDF 3 should be used?

Use PyPDF2 - which PyPDF 2 or PyPDF 3 should be used?

Introduction In previous article, we can extract text on a PDF file using PyPDF2. Use PyPDF2 - open PDF file or encrypted PDF file Use PyPDF2 - extract text data from PDF file I will introduce PyPDF3 in this article. PyPDF2 and PyPDF3 exist When I looked for various usage of PyPDF2, I found the follwing commnet in StackOverflow. The PyPDF2 has been stopped since 3 years ago?! And, new