Techiio-author
Started by Jofar ArcharNov 9, 2021

Open
Search Salesforce with selenium

1 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 1 VIEWES SHARE

I am looking to use selenium for chrome with salesforce to go looking the salesforce for case quantity. I'm able to log in and write the case range within the salesforce seek container, however, I am not capable of retrieving the output.

My code:

# create a new Chrome session
driver = webdriver.Chrome(chrome_driver_path)
driver.implicitly_wait(300)
driver.maximize_window()
# Navigate to the application home page
driver.get("https://salesforce.com/xxx")
driver.implicitly_wait(100)
search_field = driver.find_element_by_xpath("//input[@title='Search Salesforce']")
search_field.click();
search_field.clear();
search_field.send_keys("case number").wait();
driver.find_element_by_xpath("//span[@title='case number']");
search_field.click();
driver.implicitly_wait(10)
search_field.submit();
search_field.sendKeys(Keys.RETURN);

1 Replies

Techiio-commentatorMurray Thomson replied 3 days ago0 likes0 dislikes

There is a chance that the 'value' attribute does not get updated after you enter a value in the search field. In that case, either

Click somewhere outside of the box

or hit tab using search_field.sendKeys(Keys.TAB);

or hit enter using search_field.sendKeys(Keys.RETURN); as long as it doesn't take you away from the page.

You must be Logged in to reply
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Recommended Blogs
1
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance