Can we use Selenium webdriver for automating MS CRM 2015 based application?If not, is there any specific reason for that.
Since there is a duplicated question (Does Selenium suports CRM applications) asked recently, I'll provide my answer here.
I have successfully implemented selenium webdriver automation with Dynamics CRM. The main differences between CRM and other websites are:
driver.switchTo().frame(the_frame_id)
, or better yet, implicitly wait for the frame by using ExpectedConditions.frameToBeAvailableAndSwitchToIt(by)
ExpectedConditions.invisibilityOfElementLocated(locator_of_loading_dialog)
; or for some trickier ones where the visibility is driven by a different attribute value other than display
, try ExpectedConditions.attributeContains(locator, attribute, value)
- e.g ExpectedConditions.attributeContains(By.id("some_id"), "style", "visibility: hidden")
.Other than that, it's just another web site.
Although it will be lot of work CRM
being a SPA
but you can get your way out. Here is something i answered for a similar question, in order to avoid copying it over please see it here Selenium Automation testing in crm 2015
Selenium can automate any part of a web page if it is based on HTML. So if you want to check it, open the CRM web application, open the browser console and confirm if all the elements required for your automation test are based on HTML.
The non-HTML components of a web page cannot be accessed by Selenium. You might want to use Image Based testing tools like Sikuli.