launch same test in multiple browser

10 posts, 0 answers
  1. Vin
    Vin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 29 Apr 2011 Link to this post

    Hi,

     

    Am using QA version. Am trying to launch same test in multiple browser. Using C# code am launching multiple browser and navigating all browser to Google page. Its working fine for me up to this, now I want to type a text “Google” and will click on “Google Search” Button.

     

    Have added QText and BtnGSubmit to element list using “Add to project” option (Using Hover). When I tried to write a code and not getting QText and BtnGSubmit

     

    Say “Pages.Google. “Not geeting QText and BtnGSubmit elements” please find the attached screen shot.

     

     

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 29 Apr 2011 Link to this post

    Hi Vin,

    There is a slight misunderstanding how to use our Pages class. From your second screenshot, please don't use Pages.GooglePage. Instead use Pages.Google.QText and Pages.Google.BtnGSubmit as shown in your first screenshot. "GooglePage" is actually a class definition, not an object with other properties attached to it that can be used for reference.

    Kind regards,
    Cody
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  3. Vin
    Vin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 02 May 2011 Link to this post

    Thanks so much for the resposne.

    Am trying to run same test in multiple browser and am able to launch multiple browser, but am not able to do other operations in all the browser. Other operations are happing in only last browser. Please find the attached snap shot.

     

    Please advice and let me know where I need to change the code. (Am using QA trail version).

    Please find the attached snap shot.

  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 02 May 2011 Link to this post

    Hello Vin,

    The object "ActiveBrowser" will only point to the last opened browser. You need to follow the instructions given here.

    Best wishes,
    Cody
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  5. Nate
    Nate avatar
    32 posts
    Member since:
    Feb 2011

    Posted 02 May 2011 Link to this post

    You can also set the "BrowserType" property to the desired Browser from the properties pane of the test from the project's page. I have attached a screen-shot for this.
  6. Vin
    Vin avatar
    17 posts
    Member since:
    Jul 2012

    Posted 03 May 2011 Link to this post

    Thanks so much for the response.

     

    Could you please let me know how to use Handlers option in QA edition.

  7. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 03 May 2011 Link to this post

    Hello Nate,

    This documentation may help some. If you have specific questions on how to handle a specific dialog, please share with us a screen shot of the dialog you need help automating so we can answer it with the right solution for you.

    All the best,
    Cody
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  8. Selvakumar
    Selvakumar avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Sep 2012 Link to this post

    Hi Cody,
              
           Currently my application uses active directory authentication. I am trying to create a common login function for the whole project so,by just sending username and password as parameter, the logon dialog should be handled and user should be taken to the home page. When I have the login function within a particular testcase, and unchecking the step, passing parameters to the function from other step, the logon dialog is handled successfully and able to proceed, but when I moved the common login function outside the testcase and put it as common function and trying to call from other cases during login step, it fails with "Null reference exception"

    a)How I can pass ActiveBrowser object to outside common function from the current executing test case 

    or Is there any other solution for this which can solve the problem. Please advise
  9. Byron
    Admin
    Byron avatar
    184 posts

    Posted 06 Sep 2012 Link to this post

    Hi Selvakumar,

    If you would like to create global variables or functions in Test Studio Standalone version that are accessible from all the tests within the test project, you can create a utility class. This class  will contain the intended functions or variables. 

    Greetings,
    Byron
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  10. Selvakumar
    Selvakumar avatar
    2 posts
    Member since:
    Sep 2012

    Posted 07 Sep 2012 Link to this post

    Byron, Thanks for your reply and this is how I created solution for it

    I have created a common function accepting Username, Password,Browser object and Manager object as parameters and calling this function whenever required to handle logon dialog. So for the entire project, logon dialog is handled by just calling this Common function

    Thanks again,
    Selvakumar



Back to Top