URGENT PLEASE: Selenium for Salesforce.com

746 views
Skip to first unread message

Sreenivas Malladi

unread,
Aug 25, 2013, 12:49:58 PM8/25/13
to seleniu...@googlegroups.com
We are working towards proposing automation solution for Salesforce.com applications, using Open Source tools. We have used Selenium for several web applications related automation. Can you please advise if Selenium web driver (with Java) works for Salesforce.com. After doing some research, a consistent problem that I have noticed expressed by others was regarding Element IDs. Due to the way metadata is handled for generating the Salesforce.com UI, the input / output elements are not gauranteed to the same across environments, etc. We use Selenium for testing in the standard UI but can't use it for Visualforce pages for this reason.

Also, are there any other issues that prevent Selenium to be the tool of choice for Salesforce.com automation?

Luke Inman-Semerau

unread,
Aug 26, 2013, 1:17:32 PM8/26/13
to seleniu...@googlegroups.com
The id's are autogenerate (kind of) in salesforce. Typically a developer working in Visual Force pages puts an id on an element, but when it gets rendered to the browser (and thus what selenium sees) it looks something like this:
id="j_id0:j_id1:j_id2:loginForm:password"

the id the developer put on it is "password", "loginForm" is the id of the form and is thus 'namespaced'.

You can rely on the id's your developer chose to always show up in the id attribute at the end. So you locator can then be made using css:

"*[id$='password']"

meaning any element which has an id attribute that ends with 'password'

There's nothing that prevents selenium from automating Salesforce.com, in fact Salesforce.com uses Selenium/WebDriver to test itself too.

-Luke
(Yes... I work at Salesforce)

Babu Rao

unread,
Feb 12, 2015, 10:57:05 AM2/12/15
to seleniu...@googlegroups.com
 
We are trying to do test automation Sales force.
We see  following issues
1) selenium not able to detect completion of page load [ we use wait for element/clickable in new page , etc] It finds element, when But when it clicks, it does not go to new page {that means page load is not complete}.
 
2) We tried to do wait till  document.readyState === “complete”.   Still we see the component in new page not getting clicked
Pl provide resolution for page synchronization /to know really when page load is complete & it is ready to receive the selenium webement operations (click, etc) 

sahajamit

unread,
Feb 22, 2015, 10:16:04 AM2/22/15
to seleniu...@googlegroups.com
We have solved this problem by introducing Browsermob proxy (BMP) in to our
framework. BMP is a standalone java component which works as a proxy server
and can be easily integrated with Selenium WebDriver.

Once we enable it then all our browser network traffic will go through this
proxy server then we can utilize a method called
"waitfornetworktraffictostop" which will wait your script execution till the
network traffic stops. This will give you the surety that page is completely
loaded.

I hope this will solve your problem



--
View this message in context: http://selenium.10932.n7.nabble.com/URGENT-PLEASE-Selenium-for-Salesforce-com-tp28380p42846.html
Sent from the Selenium - Users mailing list archive at Nabble.com.
Reply all
Reply to author
Forward
0 new messages