Articles

Alert windows are widely used across websites where an alert message acts as a mode to ‘interrupt’ the current flow of the user journey. A simple example of a JavaScript alert would be someone filling in details on the sign-up page and submitting the details without entering some mandatory information. This user flow also needs to be verified when Selenium automation testing is performed on the web product. 

Handling pop-ups and alerts are one of the common test scenarios that should be tested using Selenium WebDriver. In this post of the Selenium Python tutorial series, we look at how to handle JavaScript alerts in Python. It is worth mentioning that the core fundamentals of JavaScript alerts and popups remain unchanged irrespective of the programming language used for Selenium.

Source de l’article sur DZONE

The trend of time series is the general direction in which the values change. In this post, we will focus on how to use rolling windows to isolate it. Let’s download the interest in the search term Pancakes from Google Trends and see what we can do with it:

import pandas as pd
import matplotlib.pyplot as plt
url = './data/pancakes.csv' # downloaded from https://trends.google.com
data = pd.read_csv(url, skiprows=2, parse_dates=['Month'], index_col=['Month'])
plt.plot(data)

Pandas Tutorial

Looking at the data we notice that there’s some seasonality (Pancakes Day! Yay!) and an increasing trend. What if we want to visualize just the trend of this curve? We only need to slide a rolling window through the data and compute the average at each step. This can be done in just one line if we use the rolling method:

Source de l’article sur DZONE

Welcome to the third and final part of this Python functions series! If you missed Part 1 or Part 2, follow those links to check them out. 

Python Recursive Functions

What Is Recursion in Python?

Recursion is the process of defining something in terms of itself.

Source de l’article sur DZONE