gs = driver.find_elements(By.XPATH, '//*[@id="__next"]/main/div/div/div/div/div')
num = 0
for g in gs:
#iterate thru unneseccary elements
while num < 6:
num+=1
continue
h2= g.find_element(By.XPATH, '//h2').text
print(h2))
print(g.get_attribute("innerText"))
num+=1
1 Heading
1 Heading
1 Heading
2 Heading
1 Heading
3 Heading
1 Heading
1 Heading
2 Heading
2 Heading
3 Heading
3 Heading
# h2= g.find_element(By.XPATH, '//h2').text
h2 = g.find_element(By.XPATH, './/h2').text