This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interacting with Salesforce iFrames

Currently developing automation against Salesforce using LeanFT v12.54 and Visual Studio 2012 (using C#). Working with Chrome Version 80.0.3987.149 (Official Build) (64-bit). On Windows 10. 

I'm building an app model for the Contracts tab within Salesforce (specifically the Contract Documents) and have noticed that most of this section is contained within an iframe, which I can identify in the dev console using xpath ("//ARTICLE[normalize-space()='Contract Documents']//IFRAME").

In my C# code I'm instantiating a new object of Web.Frame() and then calling Find() using the above xpath but it's returning false.

Other notes: If I use the LeanFT Object Identification Center tool on this page it cannot penetrate any objects within the iFrame. I've been able to capture xpaths for elements within the iframe using Chrome dev tools but when I run them in the console they don't return any matches, unless I first expand the iframe element under the Elements tab, after which my xpath will return a match.

So I'm not sure why my Find() call is failing, and I need to find a way to interact with elements within the iFrame consistently using xpaths.

Edit: I've tried changing my C# code to instantiate a new object of type Web.WebElement instead of Web.Frame and using the same xpath it's able to find it as a WebElement but not as a Frame.

 

  • 0  

    Hi,

    The version that you are using is very old. can you upgrade to the latest version and recheck your issue?

    Regards,

    Dror

  • 0 in reply to   

    Hi! I've just installed LeanFT 14.53 to see if that resolves this issue but cannot get the Testing Agent extension to install in Chrome. 

    When I drag and drop the Agent.crx file into Chrome I get the error: "crx required proof missing".

    I would normally now try to use the "load unpacked" option in the Chrome extensions view but this option is blocked where I work.

  • 0 in reply to   

    Got LeanFT 14.53 installed and working with the latest version of the Functional Testing Agent for Chrome. It's still not finding the frame when I run Find() on a Frame object using the xpath. It finds it when I use a WebElement object with the same xpath.

  • 0   in reply to 

    Is there a public web site where you can demonstrate the issue?

    it will help us examine the issue

    Thanks

  • 0 in reply to   
    After playing around with it for a bit I realized that LeanFT 14.53 is able to identify elements within the iframe and so I don't need to locate the frame itself and use FindChildren on it. Working OK so far.
  • 0

    I already have existing portal which is up and running and on this portal I will add another tab along with the rest of the standard salesforce tabs. For example,On the portal if we have tabs such as contact, cases etc.

    I will add another tab such as analysis and underneath this tab I want to open another website(This website has applications written in flash,basically I will be running flash applications in the website based on user interactions on the website and this website will run in the portal).

    I am thinking of doing it in visual force page and iframe and within Iframe run this website If I create webtab ,will that take care of the above problem,will that ensure that when somebody clicks on the tab ,underneath it he will see that website on the portal ,