css-selectors

last-child not working css/html

为君一笑 提交于 2021-02-16 20:08:15
问题 I'm trying to have a row of four divs. .frontpage { width: 240px; margin-bottom: 20px; margin-right: 50px; float: left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .frontpage img { margin: 10px auto; } .frontpage a:last-child img { margin-right: 0; } <div class="frontpage">RETRO <br> <a href="retro/index.html"> <img src="images/name1.jpg" alt=""> </a> <p>TEXT</p> <div class="readmore"><a href="retro/index.html">READ MORE</a> </div> <div class=

last-child not working css/html

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-16 20:07:39
问题 I'm trying to have a row of four divs. .frontpage { width: 240px; margin-bottom: 20px; margin-right: 50px; float: left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .frontpage img { margin: 10px auto; } .frontpage a:last-child img { margin-right: 0; } <div class="frontpage">RETRO <br> <a href="retro/index.html"> <img src="images/name1.jpg" alt=""> </a> <p>TEXT</p> <div class="readmore"><a href="retro/index.html">READ MORE</a> </div> <div class=

Reset pseudo class changes in css

一笑奈何 提交于 2021-02-16 19:37:06
问题 In the snippet below I have made the first list item red, and hidden all the other list items. I am then trying to display all the list items and make them all black by targeting the li elements. Currently, no changes using the last li selector are being made. So, I'm wondering why the last li selector is having no effect on the visual output? Thanks li:not(:first-child) { /* Hide all li elements other than the first one */ display: none; } li:first-child { /* Set list item 1 to be red */

How to click a dropdown button within a svg tag using Selenium and Python

半腔热情 提交于 2021-02-15 07:33:49
问题 I have a website where i want to download an excel file. https://www.rivm.nl/media/smap/eenzaamheid.html I want to be able to click the download button and then click download xls. To click the first button i tried the following: WebDriverWait(driver, 10).until(EC.visibility_by_element_located(By.XPATH('//path[@d="M 11.6 5 L 11.6 17 M 7.4 12.6 L 11.6 17 L 15.799999999999999 12.6 M 3 19 L 3 21 L 21 21 L 21 19"]'))).click() and WebDriverWait(driver, 10).until(EC.visibility_by_element_located(By

Java Selenium webdriver expression finding dynamic element by ccs that starts with and ends with

▼魔方 西西 提交于 2021-02-13 17:34:31
问题 I have the below HTML element that I need to find. Now, this "id" name is dynamic in the way that the int "0" at the end will change, but I know what it will be. The first int in "0-0" will also change, but it doesn't matter what it will be. <div id="ui-select-choices-row-0-0"> I've tried the below code that looks for an element that starts with "#ui-select-choices-row-" and ends with the desired input of "int", but it's not finding it as expected. Any suggestions on what I'm doing wrong here

Java Selenium webdriver expression finding dynamic element by ccs that starts with and ends with

╄→尐↘猪︶ㄣ 提交于 2021-02-13 17:34:25
问题 I have the below HTML element that I need to find. Now, this "id" name is dynamic in the way that the int "0" at the end will change, but I know what it will be. The first int in "0-0" will also change, but it doesn't matter what it will be. <div id="ui-select-choices-row-0-0"> I've tried the below code that looks for an element that starts with "#ui-select-choices-row-" and ends with the desired input of "int", but it's not finding it as expected. Any suggestions on what I'm doing wrong here

How to extract the text 73 from the text 1-16 of 73 results from the search result summary within https://www.amazon.com using Selenium and Java

ε祈祈猫儿з 提交于 2021-02-11 14:24:35
问题 I am navigating to https://www.amazon.com/ there I am looking for 'samsung tv 55 inch' setting it in the search box text field then I am trying to extract the text of (63 results [see image attached]): I can't find the correct locator and how to find it, this is my code: package com.bottomline.automation.tests.ui; import com.bottomline.automation.pageobjects.model.AmazonWebPage; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class AmazonTest extends

How to scrape views from Youtube pages

拥有回忆 提交于 2021-02-11 14:21:22
问题 My code is good for the most part I currently get all the titles from a youtube page + do a scroll. How would I get the number of views? Would CSS or xPath work? import time from selenium import webdriver from bs4 import BeautifulSoup import requests from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from webdriver_manager.chrome import ChromeDriverManager options = Options() driver =

Python +Selenium can't find element to send key

被刻印的时光 ゝ 提交于 2021-02-11 13:54:40
问题 I already deal with it for many days having no idea how to solve it... That is the element I want to get by selenium <input name="QUICKSEARCH_STRING" id="QUICKSEARCH_STRING" onfocus="setTimeout('focusSearchElem()', 100);" type="text" value=""> They all pop out the warning like this one ===> Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="QUICKSEARCH_STRING"]"} (Session info: chrome=79.0.3945.88) It is my code: import selenium.webdriver from

selenium.common.exceptions.TimeoutException while clicking on a button using expected_conditions presence_of_element_located in Selenium Python

℡╲_俬逩灬. 提交于 2021-02-11 13:09:20
问题 I want to create an automatic creation for Nike accounts. For that I need to add a phone number. I am coding with Python 3, Selenium and the Chrome Webdriver. This is my current code: driver.get('https://www.nike.com/de/member/settings') element2 = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, "/html/body/div[3]/div/div[6]/div[2]/div[2]/div/form/div[2]/div[5]/div/div/div/div[2]/button"))) driver.execute_script("arguments[0].click();", element2) time.sleep(1) This