User Tools

Site Tools


informatica:linux:selenium

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
informatica:linux:selenium [2019/09/23 14:45] joseinformatica:linux:selenium [2019/09/23 19:29] jose
Line 270: Line 270:
  
 ===== Whatsapp ===== ===== Whatsapp =====
 +==== Enviar mensaje ====
 +
 <code> <code>
-xpath = './/span[contains(@title, "Jose")]'+xpath = './/span[contains(@title, "Armando Bronca")]'
 o = driver.find_element_by_xpath(xpath) o = driver.find_element_by_xpath(xpath)
 o.click() o.click()
Line 280: Line 282:
  
 xpath = './/button[contains(@class, "_3M-N-")]' xpath = './/button[contains(@class, "_3M-N-")]'
 +o = driver.find_element_by_xpath(xpath)
 +o.click()
 +</code>
 +==== Adjuntar fichero ====
 +<code>
 +xpath = './/span[contains(@title, "Armando Bronca")]'
 +o = driver.find_element_by_xpath(xpath)
 +o.click()
 +
 +xpath = './/div[contains(@title, "Adjuntar")]'
 +o = driver.find_element_by_xpath(xpath)
 +o.click()
 +
 +o = driver.find_element_by_xpath("//input[@type='file']")
 +o.send_keys(os.getcwd()+"/tmp/caron.png")
 +
 +xpath = './/span[contains(@data-icon, "send-light")]'
 o = driver.find_element_by_xpath(xpath) o = driver.find_element_by_xpath(xpath)
 o.click() o.click()
 </code> </code>
informatica/linux/selenium.txt · Last modified: 2022/12/27 09:08 by jose