informatica:linux:selenium:ejemplos
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:selenium:ejemplos [2020/05/01 08:38] – jose | informatica:linux:selenium:ejemplos [2020/07/04 00:22] (current) – jose | ||
---|---|---|---|
Line 88: | Line 88: | ||
xpath = "// | xpath = "// | ||
o = driver.find_element_by_xpath(xpath) | o = driver.find_element_by_xpath(xpath) | ||
+ | o.click() | ||
Podemos seleccionar por texto, pero cuidado con las webs multidioma: | Podemos seleccionar por texto, pero cuidado con las webs multidioma: | ||
xpath = "// | xpath = "// | ||
o = driver.find_element_by_xpath(xpath) | o = driver.find_element_by_xpath(xpath) | ||
+ | o.click() | ||
+ | |||
+ | ====== Grabar todo el contenido de una web ====== | ||
+ | < | ||
+ | content = driver.page_source | ||
+ | with open(' | ||
+ | f.write(content) | ||
+ | </ |
informatica/linux/selenium/ejemplos.1588322282.txt.gz · Last modified: 2020/05/01 08:38 by jose