What I learned new this week (week 17)
-
In binary, the digit that is farthest to the right is called the Least Significant Bit (LSB) and the left-most digit is called the Most Significant Bit (MSB).
-
In Python Selenium, we can take screenshot of entire web page using the
screenshot()
method of the driver.
from selenium import webdriver
driver = webdriver.Edge()
driver.get('https://dshaw0004.netlify.app')
driver.screenshot('dshaw0004.png')
driver.quit()
- Also we can take screenshot of any specific element by using its
screenshot()
method.
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Edge()
driver.get('https://dshaw0004.netlify.app')
welcome = driver.find_element(By.CSS_SELECTOR, 'div.welcomeSection')
welcome.screenshot('welcome-to-dshaw0004.png')
driver.quit()
-
I recently learned that we can disable the scripts, forms, popups of an
iframe
embedded webpage just by usingsandbox=""
attribute. -
In HTML,
output
tag is generally used to output simple form result, calculation etc.
That’s it for this week. Meeting you next week.