'How do I start doing Automation with Salesforce?

I'm currently writing some automation with Salesforce, Python and Selenium. My problem is that some of the Dynamic Elements are not reachable. However, I would like to know a better way to build a better test.

Example:

<input lightning-input_input="" type="text" id="input-45" maxlength="120" name="Name" required="" class="slds-input" aria-describedby="help-message-45">

Python Code:


driver.find_element_by_css_selector('slds-template__container > input[name="Name]').send_keys('MockData Test')

The problem is that is not calling this element it says that is unable to locate or find the element. Does anyone know a better way to do this?



Solution 1:[1]

Try using driver.find_elements_by_class_name("slds-input") (be sure to specify the nth occurrence of the class)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tkinter Lover