Telerik Forums
Test Studio Forum
7 answers
163 views
I am creating a test that does the following:
  • open a list of report links
  • foreach report, click a button or a link to launch a new browser to run the report
  • maximize the new window
  • capture the browser in an image

My method is:

[CodedStep(@"Click 'ContentPlaceHolder1RgPRgRBtnRunButton'")]
public void getClientReports_CodedStep1()
{
    List<HtmlTableRow> advancedReports = new List<HtmlTableRow>();
    List<HtmlTableRow> classicReports = new List<HtmlTableRow>();
    ReadOnlyCollection<HtmlInputButton> expandButtons = Pages.TargetPage.Find.AllByAttributes<HtmlInputButton>("class=rgExpand");
    foreach (HtmlInputButton expandBtn in expandButtons)
    {
        expandBtn.Click(false);
    }
    ReadOnlyCollection<HtmlTableRow> reportRow = Pages.VergeSolutionsLLC86.Find.AllByXPath<HtmlTableRow>("//table[@class='rgMasterTable']/tbody/tr[contains(@id,'ContentPlaceHolder1')]");
    system = Pages.TargetPage.Find.ById("ctl00_ucHeader_lblSystem").InnerText;
    org = Pages.TargetPage.Find.ById("ctl00_ucHeader_l_hco").InnerText;
    foreach(HtmlTableRow row in reportRow)
    {
        ReadOnlyCollection<HtmlTableCell> cells = row.Find.AllByTagName<HtmlTableCell>("td");
        if (cells.Count > 5)
        {
            if (cells[5].InnerText == "Advanced")
            {
                reportName = cells[1].InnerText;
                HtmlInputButton btnRun = cells[6].Find.AllByTagName<HtmlInputButton>("input")[0];
                btnRun.Click(false);
                System.Threading.Thread.Sleep(5000);
                Manager.ActiveBrowser.Window.Maximize();
                Manager.Log.CaptureBrowser(Manager.ActiveBrowser, system + "." + org + "." + reportName);
                Manager.Browsers[1].Close();
            }
            if (cells[5].InnerText == "Classic")
            {
                reportName = cells[1].InnerText;
                HtmlAnchor btnRun = cells[6].Find.ByContent<HtmlAnchor>("Run");
                btnRun.Click();
                System.Threading.Thread.Sleep(5000);
                Manager.ActiveBrowser.Window.Maximize();
                Manager.Log.CaptureBrowser(Manager.ActiveBrowser, system + "." + org + "." + reportName);
                Manager.Browsers[1].Close();
            }
        }
    }
}

I want to capture all report outputs as images. This runs fine the first time through. The second time this runs, I get the error: "A generic error occurred in GDI+". The folder to which I am writing has write permissions (it wrote the file the first time through).

Any help with this error would be most helpful.

Thanks.

Cody
Telerik team
 answered on 14 Sep 2011
2 answers
75 views
Hello,

I have recorded a Test Case of Login and wants to record the other one which will work after login to the system. In the other Test Case, again I have to record the login Test Case and then record the other one.
Is there any procedure that I can only record the other one and I can embed the login Test case in others test cases.

Thanks,
John
Top achievements
Rank 2
 answered on 14 Sep 2011
9 answers
240 views

 

Hi,

I have an scenario to set cell value on a data grid by using with OnKeypress event. It is working and I can able to set value to the first selected row cell, but I couldn’t able to set the value to next selected row cell. It is always trying to set the value to first selected row cell instead of set value to next selected row cell.


I have noticed the first row cell is still selected even though I have select the next row cell. My issue, I don’t know how to clear onkeypress event from first row cell after set value.


Please help me in resolving this problem. I am looking for a C# code example.


Waiting for your reply.

Thanks

Ganga S

Cody
Telerik team
 answered on 14 Sep 2011
3 answers
109 views
Hi,

Let's say I have 2 test steps, step1 and step2. step1 is bound to data1 and step2 is bound to data2 and each data source has 3 rows.

Is it possible to use its own data file for each step and run in that way:
step1-data1 row1
step2-data2 row1
step1-data1 row2
step2-data2 row2
step1-data1 row3
step2-data2 row3

I have known how to use inherit parent data feature but I have too many columns for data that's why i don't want to merge them. Without using inherit parent data feature now it works like:
step1-data1 row1
step1-data1 row2
step1-data1 row3
step2-data2 row1
step1-data1 row1
step1-data1 row2
step1-data1 row3
step2-data2 row2
step1-data1 row1
step1-data1 row2
step1-data1 row3
step2-data2 row3

Thanks a lot

Ercan
Stoich
Telerik team
 answered on 14 Sep 2011
6 answers
488 views
Is there a way to wait for the page is loaded before continuing the playback?

thanks,
John
Amitab
Top achievements
Rank 1
 answered on 14 Sep 2011
1 answer
89 views
I have recorded Test cases and we were using dot net framwork 3.5. We just changed the dot net framwork 3.5 to 4.0. Now our recorded test cases is stop running. Is it supportable or not?
Please reply me ASAP. I am your licensed user.

Thanks,
Cody
Telerik team
 answered on 13 Sep 2011
1 answer
128 views
Hi All,

Will BaseURL help me to differentiate and access URLs as distinct as these three?

Here are 3 URLs when I logged into my basic system screen, with the parts I understand in color (key below) and a few questions afterwards:

https://gisqual.grinnellmutual.com/DRC01100/Policy/blank.aspx?Status_Activity=Policy&Status_IDMasterGuid=fad720bc-344b-4031-8c96-d33e5c9026c0&Status_CallingLOBPAS=0201&SysRec_User=8139&SysRec_Location=1111&SysRec_Department=1111&SysRec_SystemDate=9/12/2011

 

https://gisqual.grinnellmutual.com/DRC08010/Policy/blank.aspx?Status_Activity=Policy&Status_IDMasterGuid=7a9483d1-8fed-47df-8e46-94b66092efc6&Status_CallingLOBPAS=0201&SysRec_User=8139&SysRec_Location=1111&SysRec_Department=1111&SysRec_SystemDate=9/12/2011

 

https://gisqual.grinnellmutual.com/DRC10029/Policy/blank.aspx?Status_Activity=Policy&Status_IDMasterGuid=1a0efd70-f852-46d4-92ed-6b4c1b7265c5&Status_CallingLOBPAS=0201&SysRec_User=8139&SysRec_Location=1111&SysRec_Department=1111&SysRec_SystemDate=9/12/2011

 

BaseURL

Specific server/company I’m testing

Remainder of URL (I was on same page for all three when I copied URL.)

User ID (my logged user ID (system assigned))


My questions are:

Will the "MasterGuid" cause me any difficulty in record/playback?

What if I want to change up users I'm logged in as?

Any advice on things to watch out for? (Links to articles/posts are fine...I'm pretty new to this.)

Thanks for your time!
Dan
Anthony
Telerik team
 answered on 12 Sep 2011
1 answer
108 views
I'm testing the registration form for my application. I want to use a unique email address (either an incremental integer or maybe a date string).

Is this possible to do via the QA version without writing code? If, not, what other approaches are there to get this working?

Is it possible to then parameterise this value for use by other test steps?

Thanks,
Mark
Stoich
Telerik team
 answered on 12 Sep 2011
5 answers
204 views
Ok so I'm at a grid of contact form submissions...

In my recorded test submission I put in some text like "This is a Test Submission"

So now in the grid I need to find that item...click it, then click a delete button

What's the best way to do that?
Anthony
Telerik team
 answered on 09 Sep 2011
1 answer
103 views
Once my tests have been created I want to be able to automate the cross browser execution from the command line. How do I...

  • call the command line execution of the test?
  • specify which browser to execute the test in?
  •  parametrise the URL against which to execute?

Thanks,
Mark
Anthony
Telerik team
 answered on 09 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Iron
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Iron
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?