web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

EasyRepro clicking button in an iframe which is opened when a radio button is selected.

(0) ShareShare
ReportReport
Posted on by

I am using EasyRepro to automate tests in google chrome. What is happening is the iframe is being created with the function call

"var webresourceurl = Mscrm.CrmUri.create("/webresources/new_Dialoghtml");". This function is called when a radio button is clicked in an entity form.

When the iframe is created then I use the following code to select the OK button.

var radioButton = xrmBrowser.Driver.FindElement(By.Id("radiobuttonID"));
radioButton.Click();
xrmBrowser.ThinkTime(2000);

var iframes = xrmBrowser.Driver.FindElements(By.TagName("iframe"));
var iframe = iframes[2];
xrmBrowser.Driver.SwitchTo().Frame(iframe);

var btnOK= xrmBrowser.Driver.FindElement(By.Id("btnOK"));
btnOK.Click();

The problem is I can't find the button with id btnOK. I also looked at the iframes and none of them had a name and they all had generated id's.(I checked using google chrome inspector and all the iframes had names and actual id's not generated).

So what I am asking is how do I find the iframe and click OK on the dialog and how come I don't see the name and id's of the iframes that I see from the google chrome inspector.

Thanks in advance!

This is the iframe I want. Note I also tried using the full XPath copied from chrome inspector.

pastedimage1583519595769v2.png

ID's of the iframes I got which have none of them have a name.

pastedimage1583519876859v3.png

Here I did a query for all the iframes in the same window. They all have id's and names which don't show up in EasyRepro when I query for all iframes.

The iframe at index 2 is what I want but I didn't find the button in that iframe and I can't tell if it is the correct iframe since it has no name and id is generated.

pastedimage1583519991461v4.png

I have the same question (0)
  • LenCRM Profile Picture
    25 on at

    Did you ever find the solution to this issue?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans