Problem in Locate the Iframe elements while PlayBack the Test

2 posts, 0 answers
  1. Prakash
    Prakash avatar
    1 posts
    Member since:
    Jun 2014

    Posted 27 Jun 2014 Link to this post

    I am having this problem past couple of days...Page can't  recognize the Iframe elements..I also tried with custom code for getting frame and assign the values to the frame elements..But it didnt recognize the frame as well as elements. I got test Log like this


    6/27/2014 2:49:21 PM' - Assembly Found: C:\Users\MOCTELERICK\Documents\Test Studio Projects\MDm\bin\Entinuum.dll
    '6/27/2014 2:49:21 PM' - Loading code class: 'Entinuum.FualNetLogin'.
    ------------------------------------------------------------
    ------------------------------------------------------------
    '6/27/2014 2:49:21 PM' - Using 'InternetExplorer' version '9.0' as default browser. 
    '6/27/2014 2:49:26 PM' - 'Pass' : 1. Navigate to : 'https://fuelnetsp.stg.mansfieldoil.com/'
    '6/27/2014 2:49:27 PM' - 'Pass' : 2. Enter text 'pmartin' in 'UserNameText'
    '6/27/2014 2:49:27 PM' - 'Pass' : 3. Enter text 'FSSAdmin' in 'PasswordPassword'
    '6/27/2014 2:49:27 PM' - 'Pass' : 4. Click 'BtnLoginSubmit'
    '6/27/2014 2:49:52 PM' - 'Pass' : 5. Wait for '25000' msec.
    '6/27/2014 2:49:57 PM' - 'Pass' : 6. Click 'SiteConsoleSpan'
    '6/27/2014 2:50:22 PM' - 'Pass' : 7. Wait for '25000' msec.
    '6/27/2014 2:50:22 PM' - 'Pass' : 8. [FualNetLogin_CodedStep1] : New Coded Step
    '6/27/2014 2:50:23 PM' - 'Fail' : 9. [FualNetLogin_CodedStep] : New Coded Step
    ------------------------------------------------------------
    Failure Information: 
    ~~~~~~~~~~~~~~~
    Exception thrown executing coded step: '[FualNetLogin_CodedStep] : New Coded Step'.
    InnerException:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Entinuum.FualNetLogin.FualNetLogin_CodedStep() in c:\Users\MOCTELERICK\Documents\Test Studio Projects\MDm\FualNetLogin.tstest.cs:line 94
    ------------------------------------------------------------
    '6/27/2014 2:50:23 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
    '6/27/2014 2:50:23 PM' - Overall Result: Fail
    '6/27/2014 2:50:23 PM' - Duration: [1 min: 1 sec: 900 msec]






    Custom Code For Frames

    Settings.Current.UnexpectedDialogAction=UnexpectedDialogAction.HandleAndContinue;

    ArtOfTest.WebAii.Core.Browser frames=ActiveBrowser.Frames.ById("~fitFrameId_2572490");

    Element uname=frames.Find.ById("cphMain_ctl00_txtUserName");

    Element pass=frames.Find.ById("cphMain_ctl00_txtPassword");

    frames.Actions.SetText(uname,"pmartin");

    frames.Actions.SetText(pass,"FSSAdmin");  


    Element loginButton = frames.Find.ById("cphMain_ctl00_LoginButton");

    frames.Actions.Click(loginButton);


    I tried with this code also. But the same result came every time..Can anyone solve this issue...I am waiting for it..if anyone got anything share here...






  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 02 Jul 2014 Link to this post

    Hello Prakash,

    Most likely you are experiencing this behavior because of the frame is using dynamic id or so. Please try finding it by other attribute.
    In order to investigate this further we will need access to your application and repro steps.

    Please note that you will have to submit a support ticket if you are going to share some sensitive information.

    Regards,
    Ivaylo
    Telerik 
Back to Top