#๐Ÿ”’ Unable to click button on website

6 messages ยท Page 1 of 1 (latest)

clear lynxBOT
#

@forest spade

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

forest spade
#
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import time

# Set up the Chrome WebDriver
service = Service(ChromeDriverManager().install())
option = webdriver.ChromeOptions()
option.add_argument('--incognito')

driver = webdriver.Chrome(service=service)

# Open url
driver.get('https://login.mypurecloud.de/')
time.sleep(2)

# Locate hyperlink
link_text = 'More Login Options'
link = driver.find_element("link text", link_text)
link.click()
time.sleep(1)

# Type org into org id
input_field = driver.find_element(By.ID, 'org')
time.sleep(1)
input_field.send_keys('dimensiondataczechrepublic')
time.sleep(1)
input_field.send_keys(Keys.RETURN)
time.sleep(1)

# Type email into email id
input_field = driver.find_element(By.ID, 'email')
time.sleep(1)
input_field.send_keys('[email protected]')
time.sleep(1)

# Type password into password id
input_field = driver.find_element(By.ID, 'password')
time.sleep(1)
input_field.send_keys('Chlebaza.2kc')
time.sleep(1)
input_field.send_keys(Keys.RETURN)
time.sleep(1)

# Locate hyperlink
link_text = 'Collaborate/ Communicate'
link = driver.find_element('link text', link_text)
link.click()
time.sleep(1)

# Locate hyperlink of org
element = driver.find_element(By.XPATH, "//span[@title='NTT Czech Republic' and @class='org-name']")
element.click()
time.sleep(5)

# Transfer to admin web page
driver.get('https://apps.mypurecloud.de/directory/#/admin/welcomeV2')
time.sleep(5)

# Transfer to people web page
driver.get('https://apps.mypurecloud.de/directory/#/admin/directory/peopleV3')
time.sleep(10)

# Click on <span> add person
button = driver.find_element(By.CLASS_NAME, 'btn-default')
button.click()```
clear lynxBOT
#

@forest spade

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ Unable to click button on website