diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..668cf676 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 600d2d33..36ed679a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode \ No newline at end of file +.vscode.DS_Store +.DS_Store diff --git a/docs-apitesting/.gitattributes b/docs-apitesting/.gitattributes old mode 100644 new mode 100755 diff --git a/docs-apitesting/.gitignore b/docs-apitesting/.gitignore old mode 100644 new mode 100755 diff --git a/docs-apitesting/40x.html b/docs-apitesting/40x.html old mode 100644 new mode 100755 diff --git a/docs-apitesting/README.md b/docs-apitesting/README.md old mode 100644 new mode 100755 diff --git a/docs-apitesting/_config.yml b/docs-apitesting/_config.yml old mode 100644 new mode 100755 diff --git a/docs-apitesting/_pdf.yml b/docs-apitesting/_pdf.yml old mode 100644 new mode 100755 diff --git a/docs-apitesting/advanced-topics/ci-server-integration.md b/docs-apitesting/advanced-topics/ci-server-integration.md old mode 100644 new mode 100755 index 333e126f..6822f9a0 --- a/docs-apitesting/advanced-topics/ci-server-integration.md +++ b/docs-apitesting/advanced-topics/ci-server-integration.md @@ -4,7 +4,7 @@ page_title: CI Server Integration description: "Progress® Test Studio® for APIs - CI Server Integration" previous_url: /api-testing/advanced-topics position: 1 -publish: true +published: true --- # CI Server Integration @@ -14,15 +14,14 @@ Continuous Integration regularly integrates the individual developer's changes i Thanks to its command line interface, Test Studio for APIs can easily be integrated in most famous CI Servers. {% if site.has_cta_panels == true %} -{% include cta-panel-teststudio-overview.html %} +{% include cta-panel-overview.html %} {% endif %} ## Jenkins Integration * Install Progress® Test Studio® for APIs on your Jenkins slave or master machine (where you will execute your Jenkins project) * You can alternatively just copy the Telerik.ApiTesting.Runner.exe with the whole "runnerconsole" directory as described [here](/features/command-line/overview). - * Configure the test execution command (see [Command Line Parameters](/features/command-line/command-line-parameters) - ) - we recommend saving it to a build.cmd file. This is an example: + * Configure the test execution command (see [Command Line Parameters](/features/command-line/command-line-parameters) ) - we recommend saving it to a build.cmd file. This is an example: `Telerik.ApiTesting.Runner.exe test -p "demotests" -f junit -v base-url=http://localhost:5000 -o testresult.xml` diff --git a/docs-apitesting/advanced-topics/configure-custom-proxy.md b/docs-apitesting/advanced-topics/configure-custom-proxy.md old mode 100644 new mode 100755 index a3860c73..e5b2dbb7 --- a/docs-apitesting/advanced-topics/configure-custom-proxy.md +++ b/docs-apitesting/advanced-topics/configure-custom-proxy.md @@ -3,7 +3,7 @@ title: Configure Custom Proxy page_title: Configure Custom Proxy description: "Progress® Test Studio® for APIs - CI Server Integration" position: 2 -publish: true +published: true --- # Overview diff --git a/docs-apitesting/advanced-topics/http-request-step-authorization.md b/docs-apitesting/advanced-topics/http-request-step-authorization.md old mode 100644 new mode 100755 index 2a920107..d9bee21c --- a/docs-apitesting/advanced-topics/http-request-step-authorization.md +++ b/docs-apitesting/advanced-topics/http-request-step-authorization.md @@ -21,17 +21,17 @@ You can enable Basic and OAuth authorization for any Http Request step by follow Create 3 new variables as shown below. -![Basic][1] +![Basic](images/variables.png) > `credentials-concatenated` is a variable that contains the `username` and `password` variables concatenated by a `:` Add a Set Variable step that will transform the `credentials-concatenated` variable to a Base64 string and store it in a new variable called `credentials-encoded` -![Basic][2] +![Basic](images/encode-credentials.png) Add an Http Request step and add an `Authorization` to the list of headers and set its value to `Basic {{credentials-encoded}}`. -![Basic][3] +![Basic](images/authorization-header.png) ## OAuth @@ -41,14 +41,8 @@ Enabling OAuth authentication on a REST service api call can be achieved by comb 2.Add a new request header `Content-Type` and set its value to `application/x-www-form-urlencoded` -![Basic][4] +![Basic](images/content-type.png) 3.Add all the necessary authentication parameters to the `Body` of the request. -![Basic][5] - -[1]: /img/features/authorization/variables.png -[2]: /img/features/authorization/encode-credentials.png -[3]: /img/features/authorization/authorization-header.png -[4]: /img/features/authorization/content-type.png -[5]: /img/features/authorization/url-encoded-body.png \ No newline at end of file +![Basic](images/url-encoded-body.png) \ No newline at end of file diff --git a/docs-apitesting/img/features/authorization/authorization-header.png b/docs-apitesting/advanced-topics/images/authorization-header.png similarity index 100% rename from docs-apitesting/img/features/authorization/authorization-header.png rename to docs-apitesting/advanced-topics/images/authorization-header.png diff --git a/docs-apitesting/img/features/authorization/content-type.png b/docs-apitesting/advanced-topics/images/content-type.png similarity index 100% rename from docs-apitesting/img/features/authorization/content-type.png rename to docs-apitesting/advanced-topics/images/content-type.png diff --git a/docs-apitesting/img/features/authorization/encode-credentials.png b/docs-apitesting/advanced-topics/images/encode-credentials.png similarity index 100% rename from docs-apitesting/img/features/authorization/encode-credentials.png rename to docs-apitesting/advanced-topics/images/encode-credentials.png diff --git a/docs-apitesting/img/features/authorization/url-encoded-body.png b/docs-apitesting/advanced-topics/images/url-encoded-body.png similarity index 100% rename from docs-apitesting/img/features/authorization/url-encoded-body.png rename to docs-apitesting/advanced-topics/images/url-encoded-body.png diff --git a/docs-apitesting/img/features/authorization/variables.png b/docs-apitesting/advanced-topics/images/variables.png similarity index 100% rename from docs-apitesting/img/features/authorization/variables.png rename to docs-apitesting/advanced-topics/images/variables.png diff --git a/docs-apitesting/copyright.md b/docs-apitesting/copyright.md old mode 100644 new mode 100755 diff --git a/docs-apitesting/docs-builder.yml b/docs-apitesting/docs-builder.yml new file mode 100644 index 00000000..e6129849 --- /dev/null +++ b/docs-apitesting/docs-builder.yml @@ -0,0 +1,68 @@ +#top nagivation might be wrong +top-navigation-product: api-testing +path-prefix: /teststudio-apis/documentation +product-id: 1720 +product-name: Telerik Test Studio for APIs +product-url: https://www.telerik.com/teststudio-apis +search-engine-id: 001595215763381649090:lxlmtcw2g-u +cta-overview: "@ProductLink is a test automation platform for web, WPF, and responsive web applications, supporting UI, functional, load, and RESTful API testing. Sign up for a free 30-day trial!" +cta-intro: "@ProductLink is a test automation platform for web, WPF, and responsive web applications, supporting UI, functional, load, and RESTful API testing. Sign up for a free 30-day trial!" +default-title-prefix: Telerik Test Studio for APIs +avatar-path: ./images/avatar-ninja.svg +no-results-image-path: ./images/ninja-no-results.svg +primary-color: + light: "#1D8800" + dark: "#68BF51" + +product-code: TESTSTUDIOAPI +product-trial-url: https://www.telerik.com/try/test-studio-ultimate +contribute-url: https://github.com/telerik/teststudio-docs/edit/master/docs-apitesting +enable-tabbed-code-blocks: true +pdf-cover-png-path: ./images/pdf-cover.png +img-max-width: 100% +table-layout: fixed +disable-html-redirect: true +center-images: false + +meta: +# === Test Studio for APIs Documentation Main Nodes === + getting-started: + title: "Getting Started" + position: 2 + features: + title: "Features" + position: 3 + advanced-topics: + title: "Advanced Topics" + position: 4 + troubleshooting-guide: + title: "Troubleshooting Guide" + position: 5 + +# Features Section + features/steps: + title: "Steps" + position: 1 + features/code-features: + title: "Code Features" + position: 2 + features/record: + title: "Record" + position: 3 + features/command-line: + title: "Command Line Interface" + position: 4 + +redirects: +- + from: "^/?$" + to: "/" +- + from: "^/overview$" + to: "/" +- + from: "^/features/authorization/basic-authorization$" + to: "/features/steps/http-request#authorization" +- + from: "^/features/import/http-traffic$" + to: "/features/record/import-http-traffic" \ No newline at end of file diff --git a/docs-apitesting/downloads/Jenkins_Plugin_Apitesting.zip b/docs-apitesting/downloads/Jenkins_Plugin_Apitesting.zip old mode 100644 new mode 100755 diff --git a/docs-apitesting/favicon.ico b/docs-apitesting/favicon.ico old mode 100644 new mode 100755 diff --git a/docs-apitesting/features/code-features/add-assembly-reference.md b/docs-apitesting/features/code-features/add-assembly-reference.md old mode 100644 new mode 100755 index 2a1dcb14..c306274c --- a/docs-apitesting/features/code-features/add-assembly-reference.md +++ b/docs-apitesting/features/code-features/add-assembly-reference.md @@ -3,7 +3,7 @@ title: Add Assembly Reference page_title: Add Assembly Reference description: "Progress® Test Studio® for APIs - Code Features - Add Assembly Reference" position: 8 -publish: true +published: true --- # Add Assembly Reference diff --git a/docs-apitesting/features/code-features/code-behind-files.md b/docs-apitesting/features/code-features/code-behind-files.md old mode 100644 new mode 100755 index f7feeead..327bd926 --- a/docs-apitesting/features/code-features/code-behind-files.md +++ b/docs-apitesting/features/code-features/code-behind-files.md @@ -3,7 +3,7 @@ title: Code-Behind Files page_title: Code-Behind Files description: "Progress® Test Studio® for APIs - Code Features - Code-Behind Files" position: 2 -publish: true +published: true --- # Code-Behind Files @@ -44,7 +44,7 @@ The example below shows hot to log messages to the test output before and after ![Base Test Methods][4] -```C# +````C# // This method will execute before the start of the test case public override void OnBeforeTestStarted() { @@ -56,9 +56,8 @@ public override void OnAfterTestCompleted() { this.Log.WriteLine("Ending the test case ..."); } -``` - -```VB +```` +````VB ' This method will execute before the start of the test Case' Public Overrides Sub OnBeforeTestStarted() Log.WriteLine("The test case is starting ...") @@ -68,7 +67,7 @@ End Sub Public Overrides Sub OnAfterTestCompleted() Log.WriteLine("Ending the test case ...") End Sub -``` +```` [Back to top](#Code-Behind-Files) @@ -94,7 +93,7 @@ The **Context.SetValue** method sets a value to a runtime variable. You can stor #### Examples -```C# +````C# // This statement will create a variable named "user-name" with value "user1" // in the scope of the current test case this.Context.SetValue("user-name", "user1", o); @@ -102,9 +101,8 @@ this.Context.SetValue("user-name", "user1", o); // This statement will create a variable named "user-id" with value 123 // in the root scope of the project this.Context.SetValue("user-id", 123, 1); -``` - -```VB +```` +````VB // This statement will create a variable named "user-name" with value "user1" // in the scope of the current test case this.Context.SetValue("user-name", "user1", 0); @@ -112,7 +110,7 @@ this.Context.SetValue("user-name", "user1", 0); // This statement will create a variable named "user-id" with value 123 // in the root scope of the project this.Context.SetValue("user-id", 123, 1); -``` +```` [Back to top](#Code-Behind-Files) @@ -135,19 +133,18 @@ The **Context.GetValue** method returns the value of a specified runtime variabl #### Examples -```C# +````C# string userName = this.Context.GetValue("user-name").ToString(); -``` - -```VB +```` +````VB Dim userName As String = Context.GetValue("user-name").ToString() -``` +```` > Remember to cast properly your variables when using Context.GetValue. The method returns an object and you need to be aware of where and how the target value was initially created. Any variable, created manually in the Variables pane in the UI, is stored as a string. ![Casting Variables][5] -```C# +````C# int count = 5; this.Context.SetValue("count", count, 0); @@ -164,7 +161,7 @@ this.Log.WriteLine(newUserId.ToString()); // The "user-name" variable is stored as string, but you still need to convert it with .ToString() string userName = this.Context.GetValue("user-name").ToString(); this.Log.WriteLine(userName); -``` +```` [Back to top](#Code-Behind-Files) @@ -180,13 +177,12 @@ The **ApiTestBase** base class exposes a **Log** property of type **ILog** which #### Examples -```C# +````C# this.Log.WriteLine("Logging some message from C# code ..."); -``` - -```VB +```` +````VB Log.WriteLine("Logging some message from VB code ...") -``` +```` > See the [Sample Project](../../getting-started/sample-project) for more examples. @@ -198,7 +194,7 @@ The Telerik.ApiTesting.Framework namespace provides a basic assertion framework The following methods ae available: -```C# +````C# static void AreEqual(T expected, T actual); static void AreEqual(T expected, T actual, string message); @@ -226,9 +222,8 @@ static void IsNull(object value, string message); static void IsTrue(bool condition); static void IsTrue(bool condition, string message); -``` - -```VB +```` +````VB Shared Sub AreEqual(Of T)(expected As T, actual As T) Shared Sub AreEqual(Of T)(expected As T, actual As T, message As String) @@ -256,19 +251,18 @@ Shared Sub IsNull(value As Object, message As String) Shared Sub IsTrue(condition As Boolean) Shared Sub IsTrue(condition As Boolean, message As String) -``` +```` > When an assertion fails, the execution of the test step will be terminated with status **failed** and the assertion message will be logged to the test output. ### Examples -```C# -Assert.AreEqual("administrator", actualValue); -``` - -```VB +````C# Assert.AreEqual("administrator", actualValue); -``` +```` +````VB +Assert.AreEqual("administrator", actualValue) +```` ![Assertion Error][6] diff --git a/docs-apitesting/features/code-features/code-items.md b/docs-apitesting/features/code-features/code-items.md old mode 100644 new mode 100755 index f249bb95..d292677c --- a/docs-apitesting/features/code-features/code-items.md +++ b/docs-apitesting/features/code-features/code-items.md @@ -3,7 +3,7 @@ title: Code Items page_title: Code Items description: "Progress® Test Studio® for APIs - Code Features - Code Items" position: 3 -publish: true +published: true --- # Code Items diff --git a/docs-apitesting/features/code-features/coded-steps.md b/docs-apitesting/features/code-features/coded-steps.md old mode 100644 new mode 100755 index 912ef140..885634b3 --- a/docs-apitesting/features/code-features/coded-steps.md +++ b/docs-apitesting/features/code-features/coded-steps.md @@ -3,7 +3,7 @@ title: Coded Steps page_title: Coded Steps description: "Progress® Test Studio® for APIs - Code Features - Coded Steps" position: 1 -publish: true +published: true --- # Coded Steps diff --git a/docs-apitesting/features/code-features/compile-project.md b/docs-apitesting/features/code-features/compile-project.md old mode 100644 new mode 100755 index f20d34e7..6ba70b13 --- a/docs-apitesting/features/code-features/compile-project.md +++ b/docs-apitesting/features/code-features/compile-project.md @@ -3,7 +3,7 @@ title: Compile Project page_title: Compile Project description: "Progress® Test Studio® for APIs - Code Features - Compile Project" position: 5 -publish: true +published: true --- # Compile Project diff --git a/docs-apitesting/features/code-features/debug-project.md b/docs-apitesting/features/code-features/debug-project.md old mode 100644 new mode 100755 index 6a47c736..2de5a561 --- a/docs-apitesting/features/code-features/debug-project.md +++ b/docs-apitesting/features/code-features/debug-project.md @@ -3,7 +3,7 @@ title: Debug Project page_title: Compile Project description: "Progress® Test Studio® for APIs - Code Features - Debug Project" position: 6 -publish: true +published: true --- # Debug Project @@ -12,13 +12,12 @@ When a test project is compiled, Progress® Test Studio® for APIs generates a * To launch the debugger in Visual studio, you can add a `Debugger.Launch()` statement in the code that you wish to debug. (You wll need a `using System.Diagnostics` statement too.) -```C# -`Debugger.Launch(); -``` - -```VB -`Debugger.Launch()` -``` +````C# +Debugger.Launch(); +```` +````VB +Debugger.Launch() +```` ![Add Debug Statement][1] diff --git a/docs-apitesting/features/code-features/output-panel.md b/docs-apitesting/features/code-features/output-panel.md old mode 100644 new mode 100755 index 680e8d88..a0a3181d --- a/docs-apitesting/features/code-features/output-panel.md +++ b/docs-apitesting/features/code-features/output-panel.md @@ -3,7 +3,7 @@ title: Output Panel page_title: Output Panel description: "Progress® Test Studio® for APIs - Code Features - Output Panel" position: 7 -publish: true +published: true --- # Output Panel diff --git a/docs-apitesting/features/code-features/overview.md b/docs-apitesting/features/code-features/overview.md old mode 100644 new mode 100755 index 77e5ea82..68f403b4 --- a/docs-apitesting/features/code-features/overview.md +++ b/docs-apitesting/features/code-features/overview.md @@ -3,7 +3,7 @@ title: Overview page_title: Overview description: "Progress® Test Studio® for APIs - Code Features - Overview" position: 0 -publish: true +published: true --- # Code Features Overview diff --git a/docs-apitesting/features/code-features/project-coding-language.md b/docs-apitesting/features/code-features/project-coding-language.md old mode 100644 new mode 100755 index 4aeca5a5..4db00916 --- a/docs-apitesting/features/code-features/project-coding-language.md +++ b/docs-apitesting/features/code-features/project-coding-language.md @@ -3,7 +3,7 @@ title: Project Coding Language page_title: Project Coding Language description: "Progress® Test Studio® for APIs - Code Features - Project Coding Language" position: 4 -publish: true +published: true --- # Project Coding Language diff --git a/docs-apitesting/features/command-line/command-line-parameters.md b/docs-apitesting/features/command-line/command-line-parameters.md old mode 100644 new mode 100755 index 1c652c05..682c364f --- a/docs-apitesting/features/command-line/command-line-parameters.md +++ b/docs-apitesting/features/command-line/command-line-parameters.md @@ -3,7 +3,7 @@ title: Command Line Parameters page_title: Command Line Parameters description: "Progress® Test Studio® for APIs - Command Line Parameters" position: 1 -publish: true +published: true --- # Command Line Parameters diff --git a/docs-apitesting/features/command-line/overview.md b/docs-apitesting/features/command-line/overview.md old mode 100644 new mode 100755 index 6c0ae1e2..f0c774f3 --- a/docs-apitesting/features/command-line/overview.md +++ b/docs-apitesting/features/command-line/overview.md @@ -3,14 +3,14 @@ title: Overview page_title: Overview description: "Progress® Test Studio® for APIs - Command Line Interface - Overview" position: 0 -publish: true +published: true --- # Command Line Interface - Overview Test Studio for APIs provides a Command Line Interface application (Telerik.ApiTesting.Runner.exe) that you can use to directly execute an existing test project without using the application's user interface. {% if site.has_cta_panels == true %} -{% include cta-panel-teststudio-overview.html %} +{% include cta-panel-overview.html %} {% endif %}
diff --git a/docs-apitesting/features/condition.md b/docs-apitesting/features/condition.md old mode 100644 new mode 100755 index 93df3cb8..13ca00cd --- a/docs-apitesting/features/condition.md +++ b/docs-apitesting/features/condition.md @@ -3,7 +3,7 @@ title: Condition page_title: Condition description: "Progress® Test Studio® for APIs - Condition" position: 0 -publish: true +published: true --- # Condition diff --git a/docs-apitesting/features/project-explorer.md b/docs-apitesting/features/project-explorer.md old mode 100644 new mode 100755 index fb60ce94..201da63d --- a/docs-apitesting/features/project-explorer.md +++ b/docs-apitesting/features/project-explorer.md @@ -3,7 +3,7 @@ title: Project Explorer page_title: Project Explorer description: "Progress® Test Studio® for APIs - Project explorer functionality" tags: project, explorer, mobile -publish: true +published: true position: 0 --- diff --git a/docs-apitesting/features/record/http-traffic.md b/docs-apitesting/features/record/http-traffic.md old mode 100644 new mode 100755 index 95a8ceac..c9cebf1e --- a/docs-apitesting/features/record/http-traffic.md +++ b/docs-apitesting/features/record/http-traffic.md @@ -3,7 +3,7 @@ title: Record HTTP(S) Traffic page_title: Record HTTP(S) Traffic description: "Progress® Test Studio® for APIs - Record HTTP(S) Traffic" position: 1 -publish: true +published: true --- # Record HTTP(S) Traffic diff --git a/docs-apitesting/features/record/import-http-traffic.md b/docs-apitesting/features/record/import-http-traffic.md old mode 100644 new mode 100755 index ced7f41a..cfec5361 --- a/docs-apitesting/features/record/import-http-traffic.md +++ b/docs-apitesting/features/record/import-http-traffic.md @@ -3,7 +3,7 @@ title: Import HTTP(S) Traffic page_title: Import HTTP(S) Traffic description: "Progress® Test Studio® for APIs - Import HTTP(S) Traffic" position: 2 -publish: true +published: true --- # Import HTTP(S) Traffic diff --git a/docs-apitesting/features/source-path-expressions.md b/docs-apitesting/features/source-path-expressions.md old mode 100644 new mode 100755 index 5d1248ea..e0bd0c63 --- a/docs-apitesting/features/source-path-expressions.md +++ b/docs-apitesting/features/source-path-expressions.md @@ -3,7 +3,7 @@ title: Source Path Expressions page_title: Source Path Expressions description: "Progress® Test Studio® for APIs - Source Path Expressions" position: 0 -publish: true +published: true --- # Source Path Expressions diff --git a/docs-apitesting/features/steps/goto.md b/docs-apitesting/features/steps/goto.md old mode 100644 new mode 100755 index 39defba7..f53186f2 --- a/docs-apitesting/features/steps/goto.md +++ b/docs-apitesting/features/steps/goto.md @@ -3,7 +3,7 @@ title: Goto Step page_title: Goto Step description: "Progress® Test Studio® for APIs - Steps - Goto Step" position: 1 -publish: true +published: true --- # Goto Step diff --git a/docs-apitesting/features/steps/http-request.md b/docs-apitesting/features/steps/http-request.md old mode 100644 new mode 100755 index c46d6c0c..cb68fc54 --- a/docs-apitesting/features/steps/http-request.md +++ b/docs-apitesting/features/steps/http-request.md @@ -3,7 +3,7 @@ title: Http Request Step page_title: Http Request Step description: "Progress® Test Studio® for APIs - Steps - Http Request Step" position: 2 -publish: true +published: true --- # Http Request Step diff --git a/docs-apitesting/features/steps/overview.md b/docs-apitesting/features/steps/overview.md old mode 100644 new mode 100755 index 6b6b8926..69470c2c --- a/docs-apitesting/features/steps/overview.md +++ b/docs-apitesting/features/steps/overview.md @@ -3,7 +3,7 @@ title: Overview page_title: Overview description: "Progress® Test Studio® for APIs - Steps - Overview" position: 0 -publish: true +published: true --- # Steps Overview diff --git a/docs-apitesting/features/steps/set-variable.md b/docs-apitesting/features/steps/set-variable.md old mode 100644 new mode 100755 index ec6dfd8f..44fd17b3 --- a/docs-apitesting/features/steps/set-variable.md +++ b/docs-apitesting/features/steps/set-variable.md @@ -3,7 +3,7 @@ title: Set Variable Step page_title: Set Variable Step description: "Progress® Test Studio® for APIs - Steps - Set Variable Step" position: 3 -publish: true +published: true --- # Set Variable Step diff --git a/docs-apitesting/features/steps/verification.md b/docs-apitesting/features/steps/verification.md old mode 100644 new mode 100755 index 0f485cee..3557258b --- a/docs-apitesting/features/steps/verification.md +++ b/docs-apitesting/features/steps/verification.md @@ -3,7 +3,7 @@ title: Verification Step page_title: Verification Step description: "Progress® Test Studio® for APIs - Steps - Verification Step" position: 4 -publish: true +published: true --- # Verification Step diff --git a/docs-apitesting/features/steps/wait.md b/docs-apitesting/features/steps/wait.md old mode 100644 new mode 100755 index e7dd5805..71726064 --- a/docs-apitesting/features/steps/wait.md +++ b/docs-apitesting/features/steps/wait.md @@ -3,7 +3,7 @@ title: Wait Step page_title: Wait Step description: "Progress® Test Studio® for APIs - Steps - Wait Step" position: 5 -publish: true +published: true --- # Wait Step diff --git a/docs-apitesting/features/test-results.md b/docs-apitesting/features/test-results.md old mode 100644 new mode 100755 index a9374b40..ef873b92 --- a/docs-apitesting/features/test-results.md +++ b/docs-apitesting/features/test-results.md @@ -3,7 +3,7 @@ title: Test Results page_title: Test Results description: "Progress® Test Studio® for APIs - Test Results" position: 0 -publish: true +published: true --- # Test Results diff --git a/docs-apitesting/features/variables.md b/docs-apitesting/features/variables.md old mode 100644 new mode 100755 index 02728412..9153b321 --- a/docs-apitesting/features/variables.md +++ b/docs-apitesting/features/variables.md @@ -3,7 +3,7 @@ title: Variables page_title: Variables description: "Progress® Test Studio® for APIs - Variables" position: 0 -publish: true +published: true --- # Variables diff --git a/docs-apitesting/features/verifications.md b/docs-apitesting/features/verifications.md old mode 100644 new mode 100755 index d8840895..a576b917 --- a/docs-apitesting/features/verifications.md +++ b/docs-apitesting/features/verifications.md @@ -3,7 +3,7 @@ title: Verifications page_title: Verifications description: "Progress® Test Studio® for APIs - Verifications" position: 0 -publish: true +published: true --- # Verifications diff --git a/docs-apitesting/fonts/FontAwesome.otf b/docs-apitesting/fonts/FontAwesome.otf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Bold-webfont.eot b/docs-apitesting/fonts/OpenSans-Bold-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Bold-webfont.svg b/docs-apitesting/fonts/OpenSans-Bold-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Bold-webfont.ttf b/docs-apitesting/fonts/OpenSans-Bold-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Bold-webfont.woff b/docs-apitesting/fonts/OpenSans-Bold-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Italic-webfont.eot b/docs-apitesting/fonts/OpenSans-Italic-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Italic-webfont.svg b/docs-apitesting/fonts/OpenSans-Italic-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Italic-webfont.ttf b/docs-apitesting/fonts/OpenSans-Italic-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Italic-webfont.woff b/docs-apitesting/fonts/OpenSans-Italic-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Light-webfont.eot b/docs-apitesting/fonts/OpenSans-Light-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Light-webfont.svg b/docs-apitesting/fonts/OpenSans-Light-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Light-webfont.ttf b/docs-apitesting/fonts/OpenSans-Light-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Light-webfont.woff b/docs-apitesting/fonts/OpenSans-Light-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Regular-webfont.eot b/docs-apitesting/fonts/OpenSans-Regular-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Regular-webfont.svg b/docs-apitesting/fonts/OpenSans-Regular-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Regular-webfont.ttf b/docs-apitesting/fonts/OpenSans-Regular-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Regular-webfont.woff b/docs-apitesting/fonts/OpenSans-Regular-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Semibold-webfont.eot b/docs-apitesting/fonts/OpenSans-Semibold-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Semibold-webfont.svg b/docs-apitesting/fonts/OpenSans-Semibold-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Semibold-webfont.ttf b/docs-apitesting/fonts/OpenSans-Semibold-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-Semibold-webfont.woff b/docs-apitesting/fonts/OpenSans-Semibold-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.eot b/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.svg b/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.ttf b/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.woff b/docs-apitesting/fonts/OpenSans-SemiboldItalic-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/fontawesome-webfont.eot b/docs-apitesting/fonts/fontawesome-webfont.eot old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/fontawesome-webfont.svg b/docs-apitesting/fonts/fontawesome-webfont.svg old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/fontawesome-webfont.ttf b/docs-apitesting/fonts/fontawesome-webfont.ttf old mode 100644 new mode 100755 diff --git a/docs-apitesting/fonts/fontawesome-webfont.woff b/docs-apitesting/fonts/fontawesome-webfont.woff old mode 100644 new mode 100755 diff --git a/docs-apitesting/getting-started/installation.md b/docs-apitesting/getting-started/installation.md old mode 100644 new mode 100755 index 380365cd..c613d2bc --- a/docs-apitesting/getting-started/installation.md +++ b/docs-apitesting/getting-started/installation.md @@ -3,10 +3,10 @@ title: Installation page_title: Installation description: "Progress® Test Studio® for APIs - Getting Started - Installation" position: 1 -publish: true +published: true --- -#Installation Procedure +# Installation Procedure 1. After you have downloaded the install file, locate it using Windows Explorer and double click it to launch the installer. 2. Click __Read License Agreement__, then __OK__, then I __Agree - Continue__. diff --git a/docs-apitesting/getting-started/personal-data.md b/docs-apitesting/getting-started/personal-data.md old mode 100644 new mode 100755 diff --git a/docs-apitesting/getting-started/sample-project.md b/docs-apitesting/getting-started/sample-project.md old mode 100644 new mode 100755 index a61f9dc8..23882abd --- a/docs-apitesting/getting-started/sample-project.md +++ b/docs-apitesting/getting-started/sample-project.md @@ -3,10 +3,10 @@ title: Sample Project page_title: Sample Project description: "Progress® Test Studio® for APIs - Getting Started - Sample Project" position: 2 -publish: true +published: true --- -#Running Sample Project +# Running Sample Project To help you explore the functionalities of Test Studio for APIs we have created a demo test project that calls a very simple demo application under test. diff --git a/docs-apitesting/images/2.png b/docs-apitesting/images/2.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/anchor.png b/docs-apitesting/images/anchor.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/api.png b/docs-apitesting/images/api.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/arrow.png b/docs-apitesting/images/arrow.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/avatar-ninja.svg b/docs-apitesting/images/avatar-ninja.svg new file mode 100755 index 00000000..d98c1b20 --- /dev/null +++ b/docs-apitesting/images/avatar-ninja.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs-apitesting/images/close.png b/docs-apitesting/images/close.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/column.png b/docs-apitesting/images/column.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/getting-started.png b/docs-apitesting/images/getting-started.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/howdoi.png b/docs-apitesting/images/howdoi.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/icon-telerik-badge.png b/docs-apitesting/images/icon-telerik-badge.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/important.png b/docs-apitesting/images/important.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/logo.png b/docs-apitesting/images/logo.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/menu.png b/docs-apitesting/images/menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/nav-arrow.png b/docs-apitesting/images/nav-arrow.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/ninja-icon.png b/docs-apitesting/images/ninja-icon.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/ninja-no-results.svg b/docs-apitesting/images/ninja-no-results.svg new file mode 100755 index 00000000..5d84ade5 --- /dev/null +++ b/docs-apitesting/images/ninja-no-results.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs-apitesting/images/open.png b/docs-apitesting/images/open.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/pdf-cover.png b/docs-apitesting/images/pdf-cover.png new file mode 100644 index 00000000..ce9967ef Binary files /dev/null and b/docs-apitesting/images/pdf-cover.png differ diff --git a/docs-apitesting/images/search.png b/docs-apitesting/images/search.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/tap-logo1.png b/docs-apitesting/images/tap-logo1.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/testStudioLogo.png b/docs-apitesting/images/testStudioLogo.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/testStudioforAPIsLogo.png b/docs-apitesting/images/testStudioforAPIsLogo.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/images/tutorials.png b/docs-apitesting/images/tutorials.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/advanced-topics/ci-server-integration/build-api-runner-task.png b/docs-apitesting/img/advanced-topics/ci-server-integration/build-api-runner-task.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/advanced-topics/ci-server-integration/build-task-options.png b/docs-apitesting/img/advanced-topics/ci-server-integration/build-task-options.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/advanced-topics/ci-server-integration/publish-junit.png b/docs-apitesting/img/advanced-topics/ci-server-integration/publish-junit.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/accessing-variables.png b/docs-apitesting/img/features/accessing-variables.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/authorization/basic-authorization/authorization-header.png b/docs-apitesting/img/features/authorization/basic-authorization/authorization-header.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/authorization/basic-authorization/encode-credentials.png b/docs-apitesting/img/features/authorization/basic-authorization/encode-credentials.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/clear-all-runtime-variables.png b/docs-apitesting/img/features/clear-all-runtime-variables.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/add-code-behind.png b/docs-apitesting/img/features/code-features/add-code-behind.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/add-code-item.png b/docs-apitesting/img/features/code-features/add-code-item.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/add-coded-step-context-menu.png b/docs-apitesting/img/features/code-features/add-coded-step-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/add-coded-step-test-explorer.png b/docs-apitesting/img/features/code-features/add-coded-step-test-explorer.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/add-reference-button.png b/docs-apitesting/img/features/code-features/add-reference-button.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/added-reference-assembly.png b/docs-apitesting/img/features/code-features/added-reference-assembly.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/assert-error.png b/docs-apitesting/img/features/code-features/assert-error.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/code-item-example.png b/docs-apitesting/img/features/code-features/code-item-example.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/code-item-in-project-explorer.png b/docs-apitesting/img/features/code-features/code-item-in-project-explorer.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/coded-step-select-method.png b/docs-apitesting/img/features/code-features/coded-step-select-method.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/coded-step-select-valid-method.png b/docs-apitesting/img/features/code-features/coded-step-select-valid-method.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/compile-output.png b/docs-apitesting/img/features/code-features/compile-output.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/compile-project-button.png b/docs-apitesting/img/features/code-features/compile-project-button.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/compile-project-conetxt-menu.png b/docs-apitesting/img/features/code-features/compile-project-conetxt-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/debug-in-visual-studio.png b/docs-apitesting/img/features/code-features/debug-in-visual-studio.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/debug-launch-debugger.png b/docs-apitesting/img/features/code-features/debug-launch-debugger.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/debug-prompt.png b/docs-apitesting/img/features/code-features/debug-prompt.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/debug-select-vs-instance.png b/docs-apitesting/img/features/code-features/debug-select-vs-instance.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/default-test-method.png b/docs-apitesting/img/features/code-features/default-test-method.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/edit-class-name-mapping.png b/docs-apitesting/img/features/code-features/edit-class-name-mapping.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/edit-project-properties-toolbar.png b/docs-apitesting/img/features/code-features/edit-project-properties-toolbar.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/executing-base-test-methods.png b/docs-apitesting/img/features/code-features/executing-base-test-methods.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/general-output.png b/docs-apitesting/img/features/code-features/general-output.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/invalid-method-mapping-warning.png b/docs-apitesting/img/features/code-features/invalid-method-mapping-warning.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/open-code-behind.png b/docs-apitesting/img/features/code-features/open-code-behind.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/output-pane.png b/docs-apitesting/img/features/code-features/output-pane.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/project-properties-context-menu.png b/docs-apitesting/img/features/code-features/project-properties-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/project-properties-dialog.png b/docs-apitesting/img/features/code-features/project-properties-dialog.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/select-assembly-file.png b/docs-apitesting/img/features/code-features/select-assembly-file.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/select-project-language.png b/docs-apitesting/img/features/code-features/select-project-language.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/set-code-item-name.png b/docs-apitesting/img/features/code-features/set-code-item-name.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/using-a-code-item.png b/docs-apitesting/img/features/code-features/using-a-code-item.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/code-features/variables-casting.png b/docs-apitesting/img/features/code-features/variables-casting.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/command-line/apitesting-runner-help.png b/docs-apitesting/img/features/command-line/apitesting-runner-help.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/command-line/apitesting-runner-location.png b/docs-apitesting/img/features/command-line/apitesting-runner-location.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/condition-prefix-cmd.png b/docs-apitesting/img/features/condition-prefix-cmd.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/condition-prefix.png b/docs-apitesting/img/features/condition-prefix.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/condition.png b/docs-apitesting/img/features/condition.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/disable-step.png b/docs-apitesting/img/features/disable-step.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/folder-item-context-menu.png b/docs-apitesting/img/features/folder-item-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/full-value-path-option.png b/docs-apitesting/img/features/full-value-path-option.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/conditions-and-verifications.png b/docs-apitesting/img/features/import/conditions-and-verifications.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/exchange-details.png b/docs-apitesting/img/features/import/exchange-details.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/import.png b/docs-apitesting/img/features/import/import.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/open-saz.png b/docs-apitesting/img/features/import/open-saz.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/saz-contents.png b/docs-apitesting/img/features/import/saz-contents.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/import/session-exchange.png b/docs-apitesting/img/features/import/session-exchange.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/nesting-variables.png b/docs-apitesting/img/features/nesting-variables.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/project-explorer-create-buttons.png b/docs-apitesting/img/features/project-explorer-create-buttons.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/project-explorer-search.png b/docs-apitesting/img/features/project-explorer-search.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/project-item-context-menu.png b/docs-apitesting/img/features/project-item-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/add-session.png b/docs-apitesting/img/features/record/add-session.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/browser-https-error.png b/docs-apitesting/img/features/record/browser-https-error.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/capturing-traffic.png b/docs-apitesting/img/features/record/capturing-traffic.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/certificate.png b/docs-apitesting/img/features/record/certificate.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/certificate1.png b/docs-apitesting/img/features/record/certificate1.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/clear-all.png b/docs-apitesting/img/features/record/clear-all.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/https-disabled-message.png b/docs-apitesting/img/features/record/https-disabled-message.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/new-tab.png b/docs-apitesting/img/features/record/new-tab.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/record-traffic-menu.png b/docs-apitesting/img/features/record/record-traffic-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/record-traffic-toolbar.png b/docs-apitesting/img/features/record/record-traffic-toolbar.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/recording-settings.png b/docs-apitesting/img/features/record/recording-settings.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/root-certificate-warning.png b/docs-apitesting/img/features/record/root-certificate-warning.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/stop-button.png b/docs-apitesting/img/features/record/stop-button.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/record/trash.png b/docs-apitesting/img/features/record/trash.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/source-path-options.png b/docs-apitesting/img/features/source-path-options.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/step-item-context-menu.png b/docs-apitesting/img/features/step-item-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/goto.png b/docs-apitesting/img/features/steps/goto.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request-body-format-json.png b/docs-apitesting/img/features/steps/http-request-body-format-json.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request-body-format-raw.png b/docs-apitesting/img/features/steps/http-request-body-format-raw.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request.png b/docs-apitesting/img/features/steps/http-request.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-form-data-response.png b/docs-apitesting/img/features/steps/http-request/body/body-form-data-response.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-form-data-test-file.png b/docs-apitesting/img/features/steps/http-request/body/body-form-data-test-file.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-form-data.png b/docs-apitesting/img/features/steps/http-request/body/body-form-data.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-raw-response.png b/docs-apitesting/img/features/steps/http-request/body/body-raw-response.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-raw.png b/docs-apitesting/img/features/steps/http-request/body/body-raw.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/body/body-x-www-form-urlencoded.png b/docs-apitesting/img/features/steps/http-request/body/body-x-www-form-urlencoded.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/decompress-response-http-setting.png b/docs-apitesting/img/features/steps/http-request/decompress-response-http-setting.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-basic-headers.png b/docs-apitesting/img/features/steps/http-request/http-request-basic-headers.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-basic.png b/docs-apitesting/img/features/steps/http-request/http-request-basic.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-formatting.png b/docs-apitesting/img/features/steps/http-request/http-request-formatting.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-oauth-body.png b/docs-apitesting/img/features/steps/http-request/http-request-oauth-body.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-oauth-headers.png b/docs-apitesting/img/features/steps/http-request/http-request-oauth-headers.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-oauth.png b/docs-apitesting/img/features/steps/http-request/http-request-oauth.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-protocol.png b/docs-apitesting/img/features/steps/http-request/http-request-protocol.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-response-image.png b/docs-apitesting/img/features/steps/http-request/http-request-response-image.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-response-json.png b/docs-apitesting/img/features/steps/http-request/http-request-response-json.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-request/http-request-response.png b/docs-apitesting/img/features/steps/http-request/http-request-response.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/http-response.png b/docs-apitesting/img/features/steps/http-response.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/set-variable-transformations.png b/docs-apitesting/img/features/steps/set-variable-transformations.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/set-variable.png b/docs-apitesting/img/features/steps/set-variable.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/verification.png b/docs-apitesting/img/features/steps/verification.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/steps/wait.png b/docs-apitesting/img/features/steps/wait.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/test-item-context-menu.png b/docs-apitesting/img/features/test-item-context-menu.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/variables-pane.png b/docs-apitesting/img/features/variables-pane.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/features/verifications/verification-error.png b/docs-apitesting/img/features/verifications/verification-error.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/installation/install-completed.png b/docs-apitesting/img/getting-started/installation/install-completed.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/installation/install.png b/docs-apitesting/img/getting-started/installation/install.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/installation/setup-wizard.png b/docs-apitesting/img/getting-started/installation/setup-wizard.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/installation/welcome-screen.png b/docs-apitesting/img/getting-started/installation/welcome-screen.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/sample-project/create-demo-project.png b/docs-apitesting/img/getting-started/sample-project/create-demo-project.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/sample-project/execute-demo-tests.png b/docs-apitesting/img/getting-started/sample-project/execute-demo-tests.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/getting-started/sample-project/run-demo-application.png b/docs-apitesting/img/getting-started/sample-project/run-demo-application.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/troubleshooting-guide/deregister-proxy/no-internet-connection.png b/docs-apitesting/img/troubleshooting-guide/deregister-proxy/no-internet-connection.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/troubleshooting-guide/deregister-proxy/registered-proxy.png b/docs-apitesting/img/troubleshooting-guide/deregister-proxy/registered-proxy.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/troubleshooting-guide/deregister-proxy/windows10.png b/docs-apitesting/img/troubleshooting-guide/deregister-proxy/windows10.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/troubleshooting-guide/no-test-execution-output/no-test-execution-output.png b/docs-apitesting/img/troubleshooting-guide/no-test-execution-output/no-test-execution-output.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/img/troubleshooting-guide/request-headers/request-headers.png b/docs-apitesting/img/troubleshooting-guide/request-headers/request-headers.png old mode 100644 new mode 100755 diff --git a/docs-apitesting/index.md b/docs-apitesting/index.md old mode 100644 new mode 100755 index 87847d94..67b93042 --- a/docs-apitesting/index.md +++ b/docs-apitesting/index.md @@ -1,16 +1,16 @@ --- -title: Index -page_title: Overview +title: About Test Studio for APIs +page_title: About of Test Studio for APIs description: "Progress® Test Studio® for APIs - Overview" position: 1 --- -# Overview +# About Test Studio for APIs The new Test Studio for APIs helps customers verify the integrity and reliability of their APIs in an easy way and incorporate their API testing effort in their continuous testing and delivery process. Test Studio for APIs is used to determine whether APIs return the correct response for a broad range of commonly accepted requests, react properly to edge cases such as failures and unexpected inputs, as well as deliver the responses in an acceptable amount of time. {% if site.has_cta_panels == true %} -{% include cta-panel-teststudio-introduction.html %} +{% include cta-panel-introduction.html %} {% endif %} ## Features diff --git a/docs-apitesting/redirect-tests-teststudio-apis.csv b/docs-apitesting/redirect-tests-teststudio-apis.csv new file mode 100644 index 00000000..f3ff9961 --- /dev/null +++ b/docs-apitesting/redirect-tests-teststudio-apis.csv @@ -0,0 +1,5 @@ +, / +/SYSTEM-REQUIREMENTS, /system-requirements +/overview, / +/features/authorization/basic-authorization, /features/steps/http-request#authorization +/features/import/http-traffic, /features/record/import-http-traffic \ No newline at end of file diff --git a/docs-apitesting/run.cmd b/docs-apitesting/run.cmd old mode 100644 new mode 100755 diff --git a/docs-apitesting/system-requirements.md b/docs-apitesting/system-requirements.md old mode 100644 new mode 100755 index f17231db..d04b2f28 --- a/docs-apitesting/system-requirements.md +++ b/docs-apitesting/system-requirements.md @@ -6,23 +6,23 @@ into your continuous testing and delivery process. Telerik API Testing by Progre enables even non-technical testers to get up-to-speed with testing APIs." position: 1 --- -# System Requirements# +# System Requirements ## Supported Environments * .NET Framework - 4.7.2 -## Supported Operating Systems## +## Supported Operating Systems * Windows 11. 10, 8.1 * Windows Server 2012, 2016, 2019 -## Minimum Hardware Requirements## +## Minimum Hardware Requirements * Disk Space: 500MB * RAM: 2GB * CPU: 2.4GHz {% if site.has_cta_panels == true %} -{% include cta-panel-teststudio-introduction.html %} +{% include cta-panel-introduction.html %} {% endif %} \ No newline at end of file diff --git a/docs-apitesting/troubleshooting-guide/corrupted-response.md b/docs-apitesting/troubleshooting-guide/corrupted-response.md old mode 100644 new mode 100755 index 1b14d5c6..99f6f1b0 --- a/docs-apitesting/troubleshooting-guide/corrupted-response.md +++ b/docs-apitesting/troubleshooting-guide/corrupted-response.md @@ -3,7 +3,7 @@ title: Corrupted Response due to HTTP compression page_title: Corrupted Response due to HTTP compression description: "Progress® Test Studio® for APIs - Troubleshooting guide - Corrupted response due to HTTP compression" position: 2 -publish: true +published: true --- # Corrupted Response due to HTTP compression diff --git a/docs-apitesting/troubleshooting-guide/no-internet-connection.md b/docs-apitesting/troubleshooting-guide/no-internet-connection.md old mode 100644 new mode 100755 index 3cd55c1b..9fd3b8a7 --- a/docs-apitesting/troubleshooting-guide/no-internet-connection.md +++ b/docs-apitesting/troubleshooting-guide/no-internet-connection.md @@ -4,7 +4,7 @@ page_title: No Internet Connection description: "Progress® Test Studio® for APIs - Troubleshooting guide - No Internet Connection" previous_url: /troubleshooting-guide/deregister-proxy position: 3 -publish: true +published: true --- # No Internet Connection diff --git a/docs-apitesting/troubleshooting-guide/no-test-execution-output.md b/docs-apitesting/troubleshooting-guide/no-test-execution-output.md old mode 100644 new mode 100755 index 2c430084..078b6321 --- a/docs-apitesting/troubleshooting-guide/no-test-execution-output.md +++ b/docs-apitesting/troubleshooting-guide/no-test-execution-output.md @@ -3,7 +3,7 @@ title: No Test Execution Output page_title: No Test Execution Output description: "Progress® Test Studio® for APIs - Troubleshooting guide - No Test Execution Output" position: 1 -publish: true +published: true --- # No Test Execution Output diff --git a/docs-apitesting/troubleshooting-guide/target-wrong-dll-version.md b/docs-apitesting/troubleshooting-guide/target-wrong-dll-version.md old mode 100644 new mode 100755 index af51602d..539e9390 --- a/docs-apitesting/troubleshooting-guide/target-wrong-dll-version.md +++ b/docs-apitesting/troubleshooting-guide/target-wrong-dll-version.md @@ -3,7 +3,7 @@ title: Targeting Wrong API Framework DLL Version After Upgrade page_title: Targeting Wrong API Framework DLL Version After Upgrade description: "Progress® Test Studio® for APIs - Troubleshooting guide - Targeting Wrong API Framework DLL Version After Upgrade. Error 'Could not load file or assembly 'Telerik.ApiTesting.Framework, Version=' or one of its dependencies. The system cannot find the file specified. Die Datei oder Assembly 'Telerik.ApiTesting.Framework, Version=' oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden." position: 4 -publish: true +published: true --- # Targeting Wrong API Framework DLL Version After Upgrade diff --git a/docs-apitesting/web.config b/docs-apitesting/web.config old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/README.md b/docs-teststudiodev/README.md index 1456f092..1488c64b 100644 --- a/docs-teststudiodev/README.md +++ b/docs-teststudiodev/README.md @@ -1,6 +1,6 @@ --- title: Kendo UI Documentation Repo -publish: false +published: false --- # Kendo UI Public Documentation diff --git a/docs-teststudiodev/advanced-topics/ci/execute-test-with-vstest.md b/docs-teststudiodev/advanced-topics/ci/execute-test-with-vstest.md index 8f1ca978..5c44b94c 100644 --- a/docs-teststudiodev/advanced-topics/ci/execute-test-with-vstest.md +++ b/docs-teststudiodev/advanced-topics/ci/execute-test-with-vstest.md @@ -4,7 +4,7 @@ page_title: Execute Test Studio Test with VSTestConsole.exe - Test Studio Dev Do description: Execute Test Studio Test with VSTestConsole.exe position: 10 --- -# Execute Test Studio Tests with VSTestConsole.exe # +# Execute Test Studio Tests with VSTestConsole.exe To be able to execute Test Studio tests with the Visual Studio default test runner there are few requirements to set in advance. These are described below: @@ -14,11 +14,11 @@ To be able to execute Test Studio tests with the Visual Studio default test runn 3.There are two variables you have to set before executing Test Studio tests - ***TS_PROJECT_PATH*** and ***TS_DLL_PATH***. Project path is the folder which contains the Settings.aiis file. Dll path is the folder which contains the built project dll. -``` +```` set TS_PROJECT_PATH=C:\Visual Studio 2015\Projects\TestStudioProject11\TestStudioProject11 set TS_DLL_PATH=C:\Visual Studio 2015\Projects\TestStudioProject11\TestStudioProject11\bin\Debug\TestStudioProject11.dll -``` +```` > __Note!__ The variables are set for this instance of the Developer Command Prompt. By each next start of the command prompt the variables need to be set again. Therefore these need to be set in the build tasks in __CI environment__ prior the task to execute the test. @@ -28,6 +28,6 @@ The TestAdapter dll will be in any of the sub-folders in the Visual Studio Exten Below you may find a sample command to execute a Test Studio test with the VSTestConsole.exe after the TS\_PROJECT\_PATH and TS\_DLL\_PATH variables are set for the current instance of the VS Developer Command Prompt: -``` +```` C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow>vstest.console "C:\Visual Studio 2015\Projects\TestStudioProject11\TestStudioProject11\Parent.tstest" /TestAdapterPath:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\t1fos0ab.vkx" -``` +```` diff --git a/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig1.png b/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig2.png b/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig3.png b/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig4.png b/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig5.png b/docs-teststudiodev/advanced-topics/ci/images/ciplugin/fig5.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig10.png b/docs-teststudiodev/advanced-topics/ci/images/fig10.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig11.png b/docs-teststudiodev/advanced-topics/ci/images/fig11.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig12.png b/docs-teststudiodev/advanced-topics/ci/images/fig12.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig13.png b/docs-teststudiodev/advanced-topics/ci/images/fig13.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig14.png b/docs-teststudiodev/advanced-topics/ci/images/fig14.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig2.png b/docs-teststudiodev/advanced-topics/ci/images/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig3.png b/docs-teststudiodev/advanced-topics/ci/images/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig4.png b/docs-teststudiodev/advanced-topics/ci/images/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/fig9.png b/docs-teststudiodev/advanced-topics/ci/images/fig9.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig1.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig2.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig3.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig4.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig5.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig5.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig6.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig6.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig7.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig7.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig8.png b/docs-teststudiodev/advanced-topics/ci/images/tfs2017/fig8.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/EmptyBuildDefinition.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/EmptyBuildDefinition.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig2.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig3.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig4.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig5.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig5.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig6.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig6.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig7.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig7.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig8.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig8.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig9.png b/docs-teststudiodev/advanced-topics/ci/images/vstservice/fig9.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/ci/jenkins-ci-plugin.md b/docs-teststudiodev/advanced-topics/ci/jenkins-ci-plugin.md index 4b8a789c..21c52a96 100644 --- a/docs-teststudiodev/advanced-topics/ci/jenkins-ci-plugin.md +++ b/docs-teststudiodev/advanced-topics/ci/jenkins-ci-plugin.md @@ -10,34 +10,29 @@ The Test Studio Plugin allows you to build and execute Test Studio tests and tes >The Test Studio Plugin supports Test Studio projects only. -1.Install the Jenkins CI server to run as a Java application (instead of running it as a Windows service). +1. Install the Jenkins CI server to run as a Java application (instead of running it as a Windows service). -2.Install the Test Studio Plugin - download it here and add it to the Plugin folder of the Jenkins server installation or download it from the jenkins plugin marketplace. +2. Install the Test Studio Plugin - download it here and add it to the Plugin folder of the Jenkins server installation or download it from the jenkins plugin marketplace. -3.Create a freestyle project. Create an item and select 'Build a freestyle project'. +3. Create a freestyle project. Create an item and select 'Build a freestyle project'. -![Freestyle project][2] +![Freestyle project](images/ciplugin/fig2.png) -4.Add a Test Studio runner configuration build step. Under the 'Add build step menu' section select 'Test Studio runner configuration'. +4. Add a Test Studio runner configuration build step. Under the 'Add build step menu' section select 'Test Studio runner configuration'. -![TS Plugin build step][3] +![TS Plugin build step](images/ciplugin/fig3.png) -5.Input the full path to ArtOfTest.Runner.exe. The default path to find the Test Runner executable is C:\Program Files (x86)\Progress\Test Studio\Bin. +5. Input the full path to ArtOfTest.Runner.exe. The default path to find the Test Runner executable is C:\Program Files (x86)\Progress\Test Studio\Bin. -6.Specify the test or test list to execute using the absolute path to the file in the Jenkins CI workspace or its relative to the workspace path. +6. Specify the test or test list to execute using the absolute path to the file in the Jenkins CI workspace or its relative to the workspace path. The *project root folder* and *settings file* fields accept relative path to the Jenkins job workspace only. -![Build step arguments][4] +![Build step arguments](images/ciplugin/fig4.png) -7.TestStudio test as junit test. If enabled, in the test result, test studio tests will be represented as junit tests. Otherwise, test steps from the test studio result will be represented as junit tests. +7. TestStudio test as junit test. If enabled, in the test result, test studio tests will be represented as junit tests. Otherwise, test steps from the test studio result will be represented as junit tests. -![Convert to JUnit][5] +![Convert to JUnit](images/ciplugin/fig5.png) Your test execution step is now ready to save and run. -[1]: images/ciplugin/fig1.png -[2]: images/ciplugin/fig2.png -[3]: images/ciplugin/fig3.png -[4]: images/ciplugin/fig4.png -[5]: images/ciplugin/fig5.png \ No newline at end of file diff --git a/docs-teststudiodev/advanced-topics/ci/jenkins-ci.md b/docs-teststudiodev/advanced-topics/ci/jenkins-ci.md index 81aa9fad..f33b18c9 100644 --- a/docs-teststudiodev/advanced-topics/ci/jenkins-ci.md +++ b/docs-teststudiodev/advanced-topics/ci/jenkins-ci.md @@ -8,47 +8,47 @@ position: 1 Build and execute Test Studio tests in Jenkins CI by following these steps: -1.Install the Java Web Archive (.war) for Jenkins CI. Test Studio requires the Java Web Archive version to run properly. If Jenkins runs as a service, desktop actions for functional UI tests will fail (there is no desktop interaction). +1. Install the Java Web Archive (.war) for Jenkins CI. Test Studio requires the Java Web Archive version to run properly. If Jenkins runs as a service, desktop actions for functional UI tests will fail (there is no desktop interaction). -2.Create a free-style software project. Create a job and select 'Build a free-style software project'. +2. Create a free-style software project. Create a job and select 'Build a free-style software project'. -![Free-style software project][1] +![Free-style software project](images/fig2.png) -3.Add a Windows batch command build step. Under the 'Add build step menu,' select 'Execute Windows batch command'. You can also use any other valid way that will allow you to start a windows process. +3. Add a Windows batch command build step. Under the 'Add build step menu,' select 'Execute Windows batch command'. You can also use any other valid way that will allow you to start a windows process. -![Command build step][2] +![Command build step](images/fig3.png) -4.Input ArtOfTest.Runner command line command to execute tests. Under 'Execute Windows batch command', input the ArtOfTest.Runner command to execute your test or test list, including full path to ArtOfTest.Runner.exe and appropriate arguments. +4. Input ArtOfTest.Runner command line command to execute tests. Under 'Execute Windows batch command', input the ArtOfTest.Runner command to execute your test or test list, including full path to ArtOfTest.Runner.exe and appropriate arguments. -![Arguments][3] +![Arguments](images/fig4.png) Your test execution step is now ready to save and run. ## Attach the results files to the Job -1.Add "**out**" parameter in the batch command. It should point to the defaultrkspace **(%WORKSPACE%\%JOB_NAME%%BUILD_NUMBER%**) so the results files are outputted in a folder with an unique name (Job Name + Build Number) and set the result output to be in junit format. +1. Add "**out**" parameter in the batch command. It should point to the defaultrkspace **(%WORKSPACE%\%JOB_NAME%%BUILD_NUMBER%**) so the results files are outputted in a folder with an unique name (Job Name + Build Number) and set the result output to be in junit format. -![Out parameter][4] +![Out parameter](images/fig9.png) -2.Add a post-build action of type "**Archive the artifacts**". +2. Add a post-build action of type "**Archive the artifacts**". -![Archive the artifacts][5] +![Archive the artifacts](images/fig10.png) -3.Type *${JOB_NAME}${BUILD_NUMBER}\\*** in the "**Files to archive**" field so all the results files can be taken. +3. Type *${JOB_NAME}${BUILD_NUMBER}\\*** in the "**Files to archive**" field so all the results files can be taken. -![Files to archive][6] +![Files to archive](images/fig11.png) -4.After the build completion all the results files will be attached to it. +4. After the build completion all the results files will be attached to it. -![Files to archive][7] +![Files to archive](images/fig12.png) -5.Click **Build Artifacts** and download the files in a *.zip file (it will keep the folder structure) and open the **.aiiresult* file. +5. Click **Build Artifacts** and download the files in a *.zip file (it will keep the folder structure) and open the **.aiiresult* file. -![Save in zip file][8] +![Save in zip file](images/fig13.png) -6.You can also review a result summary directly from the build page (if there are junit formatted results). +6. You can also review a result summary directly from the build page (if there are junit formatted results). -![Check the junit results][9] +![Check the junit results](images/fig14.png) Your Jenkins CI build is now ready to run. @@ -68,12 +68,4 @@ or **javaws http://$HOST:$PORT/computer/$SLAVEMACHE/slave-agent.jnlp** -[1]: images/fig2.png -[2]: images/fig3.png -[3]: images/fig4.png -[4]: images/fig9.png -[5]: images/fig10.png -[6]: images/fig11.png -[7]: images/fig12.png -[8]: images/fig13.png -[9]: images/fig14.png + diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/data-driven-image-verification.md b/docs-teststudiodev/advanced-topics/data-driven-testing/data-driven-image-verification.md index 7aea3400..c86917d2 100644 --- a/docs-teststudiodev/advanced-topics/data-driven-testing/data-driven-image-verification.md +++ b/docs-teststudiodev/advanced-topics/data-driven-testing/data-driven-image-verification.md @@ -4,14 +4,11 @@ page_title: Data Driven Image Verification - Test Studio Dev Documentation description: How to data drive image verification in Test Studio Dev position: 3 --- -# Data Driven Image Verification # +# Data Driven Image Verification To data bind an image verification step certain actions have to be performed. An approach to this scenario is to have previously stored histograms of the image element to which verification should be bonded. Then in a coded step the verification has to be managed as it is given in the sample below: -#### __[C#]__ - - {{region }} - +````C# // get an image of MyImage element System.Drawing.Bitmap bitmap = Pages.MyPage.MyImage.Capture(); @@ -36,12 +33,8 @@ To data bind an = compareValue); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim bitmap As System.Drawing.Bitmap = Pages.MyPage.MyImage.Capture() Dim histogram As ArtOfTest.Common.Histogram = ArtOfTest.Common.Histogram.FromBitmap(bitmap) @@ -59,8 +52,7 @@ To data bind an = compareValue) - {{endregion}} - +```` To complete this scenario using the provided sample: - *System.Drawings* .NET assembly has to be referenced in the project diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig1.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig2.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig3.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig4.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/oracle-db-example/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/sql-database-example/fig1.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/sql-database-example/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/images/sql-database-example/fig2.png b/docs-teststudiodev/advanced-topics/data-driven-testing/images/sql-database-example/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/oracle-db-example.md b/docs-teststudiodev/advanced-topics/data-driven-testing/oracle-db-example.md index a8f558aa..10646ac6 100644 --- a/docs-teststudiodev/advanced-topics/data-driven-testing/oracle-db-example.md +++ b/docs-teststudiodev/advanced-topics/data-driven-testing/oracle-db-example.md @@ -12,39 +12,35 @@ This example is completed using an **Oracle Database Express** (Oracle Database Next step is to create a database in order to use it for data binding. One way to do it is by using Oracle SQL Developer. On the following image there are SQL queries that will create table **Employees** and insert there two rows of data. -![Create Table][1] +![Create Table](images/oracle-db-example/fig1.png) Once the table is created it is possible to connect to it and use it for data-driven testing: -1.  Click on **Add** from **Data Sources** menu: +1. Click on **Add** from **Data Sources** menu: -![Create Table][4] + ![Create Table](images/oracle-db-example/fig4.png) -2.  In the **Create new data source** dialog - for **Data Source Types** choose **Database** +2. In the **Create new data source** dialog - for **Data Source Types** choose **Database** -![Create New Data Source][2] + ![Create New Data Source](images/oracle-db-example/fig2.png) -3.  For **Provider**, select **Oracle Data Provider for .NET** +3. For **Provider**, select **Oracle Data Provider for .NET** -4.  Here's an example for **Connection String**: +4. Here's an example for **Connection String**: -``` -Data Source=XE;User Id=SYSTEM;Password=pass; -``` + ```` + Data Source=XE;User Id=SYSTEM;Password=pass; + ```` It is possible to create many different connection strings. See here for more examples. -5.  Customize the **Friendly Name** as desired. +5. Customize the **Friendly Name** as desired. -6.  Click **Create** and the new data source should appear in the Data Sources list. +6. Click **Create** and the new data source should appear in the Data Sources list.
When a test is bound to this data base the table to be used will be specified: -![Bind To Table][3] +![Bind To Table](images/oracle-db-example/fig3.png) -[1]: images/oracle-db-example/fig1.png -[2]: images/oracle-db-example/fig2.png -[3]: images/oracle-db-example/fig3.png -[4]: images/oracle-db-example/fig4.png \ No newline at end of file diff --git a/docs-teststudiodev/advanced-topics/data-driven-testing/sql-database-example.md b/docs-teststudiodev/advanced-topics/data-driven-testing/sql-database-example.md index f2613227..544b04b3 100644 --- a/docs-teststudiodev/advanced-topics/data-driven-testing/sql-database-example.md +++ b/docs-teststudiodev/advanced-topics/data-driven-testing/sql-database-example.md @@ -10,32 +10,30 @@ Let's say we have a SQL Server with the name of **SQLEXPRESS**. We have to creat Let's create a database called **myFirstDB**: -![MS Management Studio][1] +![MS Management Studio](images/sql-database-example/fig1.png) Now we can connect to it and use it for data-driven testing. -1.  Load the **Create New DataSource** menu. +1. Load the **Create New DataSource** menu. -![Create New Data Source][2] + ![Create New Data Source](images/sql-database-example/fig2.png) -2.  Choose **Database**. +2. Choose **Database**. -3.  For **Provider**, select **SqlClient Data Provider**. +3. For **Provider**, select **SqlClient Data Provider**. -4.  Here's an example for **Connection String**: +4. Here's an example for **Connection String**: -``` -Data Source=MACHINENAME\SQLEXPRESS; Initial Catalog=myFirstDB; Integrated Security=true; -``` + ```` + Data Source=MACHINENAME\SQLEXPRESS; Initial Catalog=myFirstDB; Integrated Security=true; + ```` -- Data Source is the name of the SQL Server. -- Initial Catalog is the named of the Database. + - Data Source is the name of the SQL Server. + - Initial Catalog is the named of the Database. -It is possible to use different connection strings. See here for more examples. + It is possible to use different connection strings. See here for more examples. -5.  Customize the **Friendly Name** as desired. +5. Customize the **Friendly Name** as desired. -6.  Click on **Create** button and the new data source should appear in the Data Sources list. +6. Click on **Create** button and the new data source should appear in the Data Sources list. -[1]: images/sql-database-example/fig1.png -[2]: images/sql-database-example/fig2.png \ No newline at end of file diff --git a/docs-teststudiodev/advanced-topics/elements/change-step-target-element.md b/docs-teststudiodev/advanced-topics/elements/change-step-target-element.md index 72c0dba9..f112c5df 100644 --- a/docs-teststudiodev/advanced-topics/elements/change-step-target-element.md +++ b/docs-teststudiodev/advanced-topics/elements/change-step-target-element.md @@ -10,19 +10,18 @@ If a test step targets an incorrect element, or if you how to locate the element. Once you have located the element, you can change the find settings. + This will open the Find Element menu. You can choose how to locate the element. Once you have located the element, you can change the find settings. -![Find settings][4] + ![Find settings](images/using-chained-find-expressions/fig4.png) -For many tree nodes and other hierarchical controls, Test Studio will initially record a chained find expression. You can identify this by the way the filter(s) for the parent element (1) is connected to the filter(s) for the target element (2) by a blue diagonal arrow. If not, you can chain a new set of filters to an existing set by clicking the blue arrow. + For many tree nodes and other hierarchical controls, Test Studio will initially record a chained find expression. You can identify this by the way the filter(s) for the parent element (1) is connected to the filter(s) for the target element (2) by a blue diagonal arrow. If not, you can chain a new set of filters to an existing set by clicking the blue arrow. -2.Change the find logic to reflect the desired find strategy. The goal is to accurately identify the parent element, then give a find logic that is accurate for the target element, given it is beneath the parent element in the DOM. +2. Change the find logic to reflect the desired find strategy. The goal is to accurately identify the parent element, then give a find logic that is accurate for the target element, given it is beneath the parent element in the DOM. -3.You can manually edit the filter options, or replace one of the rules with a suggested filter from the left side. +3. You can manually edit the filter options, or replace one of the rules with a suggested filter from the left side. -![Change find settings][5] +![Change find settings](images/using-chained-find-expressions/fig5.png) Selecting a suggestion from the left will add it to the existing filter(s) for the selected element in the chained find. -![Add new filter][6] +![Add new filter](images/using-chained-find-expressions/fig6.png) Once you have added a new filter, you can remove the old sequential one. -![Delete filter][7] +![Delete filter](images/using-chained-find-expressions/fig7.png) The result is a working chained find expression. Test Studio will look for the parent element (1) first, then find the target element (2). -![New expression][8] +![New expression](images/using-chained-find-expressions/fig8.png) You can confirm that your chained find works by using the **Validate** button. -![Validate][9] +![Validate](images/using-chained-find-expressions/fig9.png) Once you validate and save the new find logic, you can select the element in the Elements Explorer and locate it in the DOM. -![Locate in DOM][10] +![Locate in DOM](images/using-chained-find-expressions/fig10.png) This can help you see how the chained find expression will work against the DOM. The target element highlighted should be beneath the parent element in the DOM hierarchy. -![Locate in DOM][11] +![Locate in DOM](images/using-chained-find-expressions/fig11.png) __See Also:__ * Watch a video tutorial on chained find expressions -[1]: images/using-chained-find-expressions/fig1.png -[2]: images/using-chained-find-expressions/fig2.png -[3]: images/using-chained-find-expressions/fig3.png -[4]: images/using-chained-find-expressions/fig4.png -[5]: images/using-chained-find-expressions/fig5.png -[6]: images/using-chained-find-expressions/fig6.png -[7]: images/using-chained-find-expressions/fig7.png -[8]: images/using-chained-find-expressions/fig8.png -[9]: images/using-chained-find-expressions/fig9.png -[10]: images/using-chained-find-expressions/fig10.png -[11]: images/using-chained-find-expressions/fig11.png \ No newline at end of file diff --git a/docs-teststudiodev/advanced-topics/installation/images/delete-key.png b/docs-teststudiodev/advanced-topics/installation/images/delete-key.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/installation/images/vs2017installation.png b/docs-teststudiodev/advanced-topics/installation/images/vs2017installation.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/installation/images/vs2022install.png b/docs-teststudiodev/advanced-topics/installation/images/vs2022install.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/installation/re-activating-your-license.md b/docs-teststudiodev/advanced-topics/installation/re-activating-your-license.md index ac618f3d..a5a457ec 100644 --- a/docs-teststudiodev/advanced-topics/installation/re-activating-your-license.md +++ b/docs-teststudiodev/advanced-topics/installation/re-activating-your-license.md @@ -4,16 +4,16 @@ page_title: Re-activating Your License - Test Studio Dev Documentation description: How to re-activate your Test Studio Dev license position: 2 --- -# Re-activating your License # +# Re-activating your License My machine was freshly imaged or replaced and I need to re-activate my license on the new machine. When I try to re-activate my new machine I have 0 seats available. To be able to generate new license key corresponding to the fresh machine follow the below steps: -1.Log on to your Telerik.com account. +1. Log on to your Telerik.com account. -2.Navigate to __Test Studio__ product. +2. Navigate to __Test Studio__ product. -3.Manage Test Studio Activation Keys. +3. Manage Test Studio Activation Keys. -4.Find and delete your old key. This will free up a slot allowing to activate your new machine. +4. Find and delete your old key. This will free up a slot allowing to activate your new machine. ![Delete key](images/delete-key.png) diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig1.png b/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig2.png b/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig3.png b/docs-teststudiodev/advanced-topics/project-configuration/images/register-certificate/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/add-existing-item.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/add-existing-item.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig1.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig2.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig3.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig4.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/run-settings-vs22.png b/docs-teststudiodev/advanced-topics/project-configuration/images/test-explorer-settings/run-settings-vs22.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/project-configuration/register-certificate.md b/docs-teststudiodev/advanced-topics/project-configuration/register-certificate.md index 8c7f67db..3d3e4dcc 100644 --- a/docs-teststudiodev/advanced-topics/project-configuration/register-certificate.md +++ b/docs-teststudiodev/advanced-topics/project-configuration/register-certificate.md @@ -12,25 +12,22 @@ If the web application you are automating is accessible via secure HTTP (HTTPS), I'm working on a web application accessible via secure HTTP (HTTPS) with a URL like this `https://www.something.com`. I encounter certificate related warnings when the Test Studio recorder or runner is attached to the browser. I do not see this warning when the recorder or runner is not attached. -![Certificate][1] +![Certificate](images/register-certificate/fig1.png) -[1]: images/register-certificate/fig1.png -[2]: images/register-certificate/fig2.png -[3]: images/register-certificate/fig3.png ## Solution This is expected behavior and it's related to the way Test Studio Dev hooks into the browser. If this warning is a problem for your test automation, use the **Register certificate** for https connection feature: -1.Open the Project Settings and go to the General section. +1. Open the Project Settings and go to the General section. -2.Click **Register certificate for https connection** under *Connection settings*. +2. Click **Register certificate for https connection** under *Connection settings*. -![Register certificate][2] + ![Register certificate](images/register-certificate/fig2.png) -3.You are prompted to install a certificate. Click Yes. After installing the certificate, you will no longer receive the certificate-related warning when automating your application with Test Studio. +3. You are prompted to install a certificate. Click Yes. After installing the certificate, you will no longer receive the certificate-related warning when automating your application with Test Studio. -![Security Warning][3] +![Security Warning](images/register-certificate/fig3.png) > Ensure that installing the certificate does not violate your company's security policies.
@@ -40,6 +37,6 @@ This is expected behavior and it's related to the way Test Studio Dev hooks into Open a command prompt and navigate to the __Test Studio Dev__ installation directory `C:\Program Files (x86)\Progress\Test Studio\Bin`. Then enter the following command to install the security certificate: -``` +```` ArtOfTest.WebAii.HttpProxy.exe InstallCertificate -``` +```` diff --git a/docs-teststudiodev/advanced-topics/recording/images/base-url/fig1.png b/docs-teststudiodev/advanced-topics/recording/images/base-url/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/recording/images/base-url/fig2.png b/docs-teststudiodev/advanced-topics/recording/images/base-url/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/advanced-topics/recording/images/base-url/fig3.png b/docs-teststudiodev/advanced-topics/recording/images/base-url/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/asp-net-host-server.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/asp-net-host-server.md index 6a4c0c7b..f89c2905 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/asp-net-host-server.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/asp-net-host-server.md @@ -4,7 +4,7 @@ page_title: Asp.NET Host Server description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Using Asp.Net In-Process Host Server# +# Using Asp.Net In-Process Host Server Many of our customers have asked for a way to execute tests without the need for a browser. They wanted a light-weight, fast and agile execution that fits within their Continuous Integration Builds and works easily with 'CruiseControl.Net' or 'Visual Studio Team Foundation Server.' We enabled these scenarios with two areas of support: @@ -18,11 +18,11 @@ Many of our customers have asked for a way to execute tests without the need for * If you are using NUnit 2.4 or higher you might experience AppDomainUnloadException similar to the issue described here. To work around this issue, please set the configuration setting legacyUnhandledExceptionPolicy to '0' in nunit.exe.config file. -\ +`` With all these in mind, let's look at an example that illustrates how we can enable our tests to run against the Asp.Net inproc host. Here is a simply Asp.Net page that utilizes several Asp.Net controls: -```ASP +````ASP <%@ Page Language="C#" %> @@ -90,29 +90,27 @@ With all these in mind, let's look at an example that illustrates how we can ena -``` +```` You can run this page using the Asp.Net InProc server by first setting the default browser to 'AspNetHost' and setting the physical location of the web application. For example, you can override these settings in your test initialization or set them in your .config file: -```C# +````C# // Set the default browser to be AspNetHost settings.DefaultBrowser = BrowserType.AspNetHost; // Set the location of the Asp.Net App settings.WebAppPhysicalPath = @"C:\MyAspNetApp\"; -``` - - -```VB +```` +````VB ' Set the default browser to be AspNetHost mysettings.DefaultBrowser = BrowserType.AspNetHost ' Set the location of the Asp.Net App mysettings.WebAppPhysicalPath = System.IO.Path.Combine(Globals.PATH_TO_PAGES, "AspNetApp") -``` +```` Next you can perform your automation in the same manner as you would for any other browser. For example: -```C# +````C# // Will initialize a new AspNetApplication object. Manager.LaunchNewBrowser(); @@ -174,10 +172,8 @@ Assert.IsTrue(label.InnerText.Contains(DateTime.Today.ToShortDateString())); Actions.Click(Find.ById("treeView1t1")); label.Refresh(); Assert.IsTrue(label.InnerText.Contains("Node2")); -``` - - -```VB +```` +````VB ' Will initialize a new AspNetApplication object. Manager.LaunchNewBrowser() @@ -235,8 +231,8 @@ Assert.IsTrue(label.InnerText.Contains(DateTime.Today.ToShortDateString)) Actions.Click(Find.ById("treeView1t1")) label.Refresh() Assert.IsTrue(label.InnerText.Contains("Node2")) -``` +```` -##Debugging Page Requests## +## Debugging Page Requests Given that these page requests are running in-process without any UI showing, it is sometimes difficult to see what exactly is being rendered. To make debugging scenarios easier, Telerik Testing Framework enables the option of rendering the responses from the Asp.Net In-Process server into an IE browser instance. To enable this debug mode, simply set the **Settings.EnableUILessRequestViewing** to True and an IE instance will launch and redirect a copy of all responses from the Asp.Net host to that instance so you can visually inspect the UI of the pages. \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/attribute-extensions.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/attribute-extensions.md index e37e5b58..c6e57b4c 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/attribute-extensions.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/attribute-extensions.md @@ -4,9 +4,9 @@ page_title: Attribute Extensions description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Unit Testing Attribute Extensions# +# Unit Testing Attribute Extensions -##What Are These Extensions?## +## What Are These Extensions? Unit testing attribute extensions is one of the coolest features of the framework. They came about as we were reviewing automated unit test code for some of our customers and our own unit testing code for the framework. The things that became apparent after reviewing these automated tests were: @@ -28,14 +28,14 @@ Attribute Extensions are test fixture attributes that can be used to decorate un * **DialogAttribute**: You use this attribute on test methods to define the Win32 pop-up dialogs you want monitored and define how you want them handled. If you have common dialogs that pop-up across your test methods, you can simply set this attribute on the test class and the dialog will be monitored and handled for all test methods contained in that test class. -##Examples## +## Examples -###FindParamAttribute### +### FindParamAttribute Let's start by taking few examples for FindParamAttribute. Assume we have an input textbox that we commonly access through out all the test methods in our Foo test class. Well, we can share this methods across all the test methods in 'foo' by setting that FindParam using FindParamAttribute on the test class like this: -```C# +````C# [TestClass] [FindParam("InputTxtbx", FindType.TagIndex, "input:0")] class Foo : BaseTest @@ -60,10 +60,8 @@ class Foo : BaseTest Actions.SetText(Find.Elements["InputTxtbx"], "test2"); } } -``` - - -```VB +```` +````VB _ Public Class Foo @@ -94,11 +92,11 @@ Public Class Foo End Sub End Class -``` +```` You can use 1-N FindParam attributes on your test class or test method. If you have elements that are shared across more than one test method, set these FindParam's on the test class, else simply set them on the test method. For example: -```C# +````C# [TestClass] [FindParam("InputTxtbx", FindType.TagIndex, "input:0")] class Foo : BaseTest @@ -134,10 +132,8 @@ class Foo : BaseTest // here. Calling Find.Elements["CheckBx"], will throw an exception. } } -``` - - -```VB +```` +````VB _ Public Class Foo @@ -176,15 +172,15 @@ Public Class Foo End Sub End Class -``` +```` -###FindParamAttributes and TestRegions### +### FindParamAttributes and TestRegions FindParamAttributes can also be used with TestRegions when they are defined within an application. In this scenario, the FindParam needs to reflect an element search within a specific TestRegion. To tie a FindParamAttribute with a TestRegion, simply set the TestRegionId property of that FindParam on your test method or test class. Here is an example: FindParamAttributes can also be used with TestRegions when they are defined within an application. In this scenario, the FindParam needs to reflect an element search within a specific TestRegion. To tie a FindParamAttribute with a TestRegion, simply set the TestRegionId property of that FindParam on your test method or test class. Here is an example: -```C# +````C# [TestMethod] [Description("Illustrate how to use FindParamAttributes with TestRegion's")] @@ -211,10 +207,8 @@ public void UsingFindParamAttributeWithTestRegion's() // Note: You can also use the FindParamAttribute(fileName) and scope all // the elements contained in file to a specific testregion. } -``` - - -```VB +```` +````VB ", "", DialogButton.OK)> _ Public Sub LogonDialogWithAttributes() ActiveBrowser.NavigateTo("") End Sub -``` +```` **Note:** All examples shown above should work with NUnit 2.4 and higher and Visual Studio Team Test. In the samples above we simply used Visual Studio Team Test. diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/frames-support.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/frames-support.md index d9491501..18790db9 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/frames-support.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/frames-support.md @@ -4,7 +4,7 @@ page_title: Frames Support description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Frames Support# +# Frames Support Telerik Testing Framework understands what Frames and IFrames are and includes built-in support to work with them. It automatically scans the webpage and locates all of the frames it contains and then adds them to the FramesCollection property of the Browser object. @@ -15,29 +15,39 @@ Frames are treated just like another browser instance. In order to work with the MethodParameterDescription - **Browser.Frames[string frameName]** - Takes a string that specifies the name of the frame. e.g. - This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. + + +**Browser.Frames[string frameName]** +Takes a string that specifies the name of the frame. e.g. +This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. - **Browser.Frames[int frameIndex]** + + +**Browser.Frames[int frameIndex]** Takes an integer specifying which frame to get from the frame collection. Useful if you know ahead of time you want the second frame. e.g. ActiveBrowser.Frames[1] This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Throws an error if the index value is out of range. - **Browser.Frames[FrameInfo frameInfo]** - Takes a FrameInfo object that specifies the properties of the frame you want. Perhaps you want to locate a frame by its src property. - This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. + + +**Browser.Frames[FrameInfo frameInfo]** +Takes a FrameInfo object that specifies the properties of the frame you want. Perhaps you want to locate a frame by its src property. +This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. - **Browser.Frames.ById(string frameId)** - Takes a string that specifies the ID of the frame. Prefix with a tilde (~) to indicate a partial match. - This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. + + +**Browser.Frames.ById(string frameId)** +Takes a string that specifies the ID of the frame. Prefix with a tilde (~) to indicate a partial match. +This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. - **Browser.Frames.BySrc(string src)** - Takes a string that specifies the source of the frame. Prefix with a tilde (~) to indicate a partial match. - This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. + + +**Browser.Frames.BySrc(string src)** +Takes a string that specifies the source of the frame. Prefix with a tilde (~) to indicate a partial match. +This method searches for a frame that matches the specified string and then returns a Browser object representing that frame that you can use to interact with the frame. Returns null if no matching frame can be found. @@ -45,7 +55,7 @@ Telerik Testing Framework allows users to access frames and perform automation a Let's take an example that demonstrates this support. Assuming we have the following simple web page: -```HTML +````HTML THE I HATE FRAMES PAGE @@ -53,11 +63,11 @@ Let's take an example that demonstrates this support. Assuming we have the follo -``` +```` To access the 't1.html' frame elements and perform actions against it, first I need to navigate to the page, then I need to access the frame that contains that page from the 'Frames[]' collection as follows: -```C# +````C# // Launch an instance of the browser Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true); @@ -80,10 +90,8 @@ t1_frame.Actions.Click(toggleOn); // Click the toggleoff button t2_frame.Actions.Click(toggleOff); -``` - - -```VB +```` +````VB ' Launch an instance of the browser Manager.LaunchNewBrowser(BrowserType.InternetExplorer, True) @@ -106,10 +114,10 @@ t1_frame.Actions.Click(toggleOn) ' Click the toggleoff button t2_frame.Actions.Click(toggleOff) -``` +```` -At this point, the 't1_frame' object is just like any other Browser object. You can use the Find.Byxxx/Actions objects to find elements/execute actions in the document or execute any of the browser actions like 'NavigateTo' or 'Refresh()', 'GoBack()', etc. +At this point, the 't1_frame' object is just like any other Browser object. You can use the Find.Byxxx/Actions objects to find elements/execute actions in the document or execute any of the browser actions like `NavigateTo` or `Refresh()`, `GoBack()`, etc. -###Notes about Frames support:### +### Notes about Frames support: -The Frames collection supports two methods that can be used to easily wait on all frames to be ready or to refresh all the DOM trees within these frames. The methods are : 'ActiveBrowser.Frames.RefreshAllDomTrees()' & 'ActiveBrowser.Frames.WaitAllUntilReady()'. You can use these methods if you are doing actions that affect all frames in the page and you want to wait for these actions across all frames all at once \ No newline at end of file +The Frames collection supports two methods that can be used to easily wait on all frames to be ready or to refresh all the DOM trees within these frames. The methods are : `ActiveBrowser.Frames.RefreshAllDomTrees()` & `ActiveBrowser.Frames.WaitAllUntilReady()`. You can use these methods if you are doing actions that affect all frames in the page and you want to wait for these actions across all frames all at once \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/JavaScript-dialogs.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/JavaScript-dialogs.md index 79e23cea..87e2b389 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/JavaScript-dialogs.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/JavaScript-dialogs.md @@ -4,11 +4,11 @@ page_title: Alert Dialogs description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#Handling Alert Dialogs# +# Handling Alert Dialogs With Alerts, you only need to define how the alert should be handled. Your options for alert handling are: DialogButton.OK or DialogButton.CLOSE. -```C# +````C# // Add an alert dialog to monitor Manager.DialogMonitor.AddDialog(new AlertDialog(ActiveBrowser, DialogButton.OK)); @@ -20,7 +20,7 @@ Manager.DialogMonitor.Start(); Actions.InvokeScript("InvokeAlert()"); // The dialog will now be automatically handled transparently in the background without any help from the test code. -``` +```` ```VB ' Add an alert dialog to monitor @@ -34,7 +34,7 @@ Manager.DialogMonitor.Start() Actions.InvokeScript("InvokeAlert()") ' The dialog will now be automatically handled transparently in the background without any help from the test code. -``` +```` > **To compile the above code include the following using:** > > using ArtOfTest.WebAii.Win32.Dialogs; diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/built-in-handlers.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/built-in-handlers.md index 83075613..8b641bf7 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/built-in-handlers.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/built-in-handlers.md @@ -4,7 +4,7 @@ page_title: Built-In Handlers description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 1 --- -#Built-In Handlers# +# Built-In Handlers Telerik Testing Framework includes native support for HTML pop-ups for all supported browsers in addition to a dialog handling framework (under the Win32.Dialogs) namespace with built-in support to handle some of the common browser dialogs like JavaScript Alert, Upload dialog and Logon dialog. The framework also enables you to extend this support to handle any custom dialog you need handled in any manner. diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-dialogs.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-dialogs.md index 19dc2d7f..9138f28c 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-dialogs.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-dialogs.md @@ -4,11 +4,11 @@ page_title: Custom Dialogs description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Custom Dialog Handler# +# Custom Dialog Handler If for whatever reason you decide that you don't like the way the dialog is being handled or want to perform extra tasks before handling the dialog, you can simply craft your own dialog handling code and then ask the dialog to call your code instead of its dialog handling code. Here is an example: -```C# +````C# public void DoCustomDialogHandlingForBuiltInDialogs() { AlertDialog myAlertDialog = new AlertDialog(ActiveBrowser, DialogButton.OK); @@ -46,10 +46,8 @@ public bool MyCustomAlertHandler(IDialog dialog) return false; } } -``` - - -```VB +```` +````VB _ Public Sub DoCustomDialogHandlingForBuiltInDialogs() @@ -82,7 +80,7 @@ Public Sub MyCustomAlertHandler(ByVal dialog As ArtOfTest.WebAii.Win32.Dialogs.I End Try End Sub -``` +```` > **To compile the above code include the following using:** > > using ArtOfTest.WebAii.Win32.Dialogs; diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-handlers.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-handlers.md index 1fc0906a..8706777d 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-handlers.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/custom-handlers.md @@ -4,33 +4,31 @@ page_title: Custom Handlers description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Creating Custom Dialog Handlers# +# Creating Custom Dialog Handlers So far we've addressed the common dialogs that browsers popup and how the built-in support can be used to handle them. So what do we do if we have a different dialog that we need to handle? Telerik Testing Framework provides a **GenericDialog class** (which does all the work for you of implementing a custom dialog handler), a **BaseDialog class** (which does most of the work of implementing a custom dialog handler), and the IDialog interface for when you need to roll your own custom dialog handler from scratch. Once implemented you can add your custom dialog handler to the **DialogMonitor** and have all your other dialogs handled just like the rest of the built-in dialogs. -##Using the GenericDialog Class## +## Using the GenericDialog Class Using the GenericDialog class you can create your own custom dialog handler that can handle most any simple standard Win32 dialog. Here's an example of how to implement a handler for Internet Explorers Security Warning dialog: -```C# +````C# GenericDialog SecurityWarningDialog = new GenericDialog(ActiveBrowser, "Security Warning", false, 1); // Click on the Yes button Manager.DialogMonitor.AddDialog(SecurityWarningDialog); -``` - - -```VB +```` +````VB Dim SecurityWarningDialog As GenericDialog = New GenericDialog(Me.ActiveBrowser, "Security Warning", False, 1) ' Click on the Yes button SecurityWarningDialog GenericDialog = GenericDialog(.ActiveBrowser, , , 1) Manager.DialogMonitor.AddDialog(SecurityWarningDialog) -``` +```` -##Using the BaseDialog Class## +## Using the BaseDialog Class By using the BaseDialog class as your base class to derive your custom dialog handler you only need to override the IsDialogActive() and Handle() functions. You may also provide your own constructor to validate the button type that will dismiss the dialog and/or accept a Desktop object (which you will need if you need to call Mouse.Click or Keyboard.SendString). Reference to System.Drawing.dll have to be added to the project as well. The below example is a complete custom dialog handler that handles the "Security Alert" dialog displayed by Internet Explorer: -```C# +````C# using System; using ArtOfTest.WebAii.Core; @@ -144,10 +142,8 @@ namespace WebTesting #endregion } } -``` - - -```VB +```` +````VB Imports ArtOfTest.WebAii.Core Imports ArtOfTest.Common.Win32 @@ -245,24 +241,22 @@ Namespace WebTesting #End Region End Class End Namespace -``` +```` Once you have implemented your new custom dialog handler it requires just one line of code to add it to the DialogMonitor: -```C# +````C# Manager.DialogMonitor.AddDialog(new SecurityAlertDialog(ActiveBrowser, DialogButton.YES, Manager.Desktop)); -``` - - -```VB +```` +````VB Manager.DialogMonitor.AddDialog(New SecurityAlertDialog(Me.ActiveBrowser, DialogButton.YES, Me.Manager.Desktop)) -``` +```` -##Implementing a Custom Dialog Handler with IDialog## +## Implementing a Custom Dialog Handler with IDialog When the GenericDialog and the BaseDialog classes don't provide the functionality you need, you can roll your own complete custom dialog handling by implementing the IDialog interface. An example of when this is necessary is when creating handlers for most FireFox dialogs. See How to handle FireFox dialogs for an example of a FireFox dialog handler implemented using the IDialog interface. A reference to UIAutomationClient.dll has to be added to the project and a using to System.Windows.Automation namespace would be required in the code. The IDialog interface has the following methods and properties that you must implement: -```C# +````C# /// /// Interface to implement for dialogs to be monitored and handled by the DialogMonitor object. /// @@ -326,10 +320,8 @@ public interface IDialog /// bool MatchesUIAutomationElement(AutomationElement element); } -``` - - -```VB +```` +````VB ''' ''' The dialogs current state. This property is Managed by the dialog ''' monitor. Implementors should simply provide a private field to @@ -438,7 +430,7 @@ End Sub ''' Private Function MatchesUIAutomationElement(element As AutomationElement) As Boolean End Function -``` +```` After implementing this interface and creating an instance of your class in your test code, you can add the instance to the DialogMonitor to begin handling of your special dialog. See Handling FireFox dialogs for an example of implementing the IDialog interface. The interface is pretty straight forward but here is how the DialogMonitor uses it: diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-download-dialog.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-download-dialog.md index 48292226..44e3cb2d 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-download-dialog.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-download-dialog.md @@ -5,11 +5,11 @@ description: "Test Studio is an innovative and easy-to-use automated web, WPF an previous_url: /user-guide/write-tests-in-code/advanced-topics/handling-html-popups-and-dialogs/built-in-dialog-handlers/handling-filedownload-dialog.aspx, /user-guide/write-tests-in-code/advanced-topics/handling-html-popups-and-dialogs/built-in-dialog-handlers/handling-filedownload-dialog position: 2 --- -#Handling FileDownload Dialogs# +# Handling FileDownload Dialogs With FileDownload, you need to pass in the full path to the download location and how the dialog should be handled. -```C# +````C# DownloadDialogsHandler dialog = new DownloadDialogsHandler (Manager.ActiveBrowser, DialogButton.SAVE, @"D:\text.txt", Manager.Desktop); Manager.DialogMonitor.Start(); @@ -20,10 +20,8 @@ Element.Click(false); dialog.WaitUntilHandled(30000); -``` - - -```VB +```` +````VB Dim dialog As New DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.SAVE, "D:\text.txt", Manager.Desktop) Manager.DialogMonitor.Start() @@ -33,7 +31,7 @@ Manager.DialogMonitor.Start() Element.Click(False) dialog.WaitUntilHandled(30000) -``` +```` > **To compile the above code include the following using:** > > using ArtOfTest.WebAii.Win32.Dialogs; diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-upload-dialog.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-upload-dialog.md index 2aa5f7c0..2addba0f 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-upload-dialog.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/file-upload-dialog.md @@ -4,11 +4,11 @@ page_title: FileUpload Dialog description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#FileUpload Dialog# +# FileUpload Dialog With FileUpload, you need to pass in the full path to the file to upload and how the dialog should be handled. The options for FileUpload are: DialogButton.OPEN, DialogButton.CANCEL or DialogButton.CLOSE. -```C# +````C# // Add a FileUpload dialog to be monitored. Manager.DialogMonitor.AddDialog(new FileUploadDialog(ActiveBrowser, @"C:\EmptyTextFile.txt", DialogButton.OPEN)); @@ -23,10 +23,8 @@ Manager.DialogMonitor.Start(); Pages.YourSite.YourButton.Click(); // Dialog should be automatically handled -``` - - -```VB +```` +````VB ' Add a FileUpload dialog to be monitored. Manager.DialogMonitor.AddDialog(New FileUploadDialog(ActiveBrowser, Path.Combine(Globals.PATH_TO_PAGES, "..\SupportFiles\EmptyTextFile.txt"), DialogButton.OPEN)) @@ -36,13 +34,13 @@ Manager.DialogMonitor.Start() ' Cause the upload Dialog to pop-up Pages.YourSite.YourButton.Click() -``` +```` -##Multiple Files Upload## +## Multiple Files Upload There are scenarios where multiple files needs to be uploaded. Below you could find a sample code how to obtain that with the Testing Framework. The code will loop through a set of files and will upload each after the previous. The sample is built against a public accessible webpage and to give a try to that example you have to first navigate to that page. -```C# +````C# // place small pictures with names file1.png and file2.png in c:\temp folder to have the sample working without modification string path = @"C:\temp\" ; @@ -84,12 +82,12 @@ for (int i = 0; i < fileNames.Length; i++ ) ActiveBrowser.Refresh(); } -``` +```` > **Note:** To compile the above code include the following using: > > using ArtOfTest.WebAii.Win32.Dialogs; -##See Also## +## See Also * How to Transfer Files diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/firefox-dialogs.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/firefox-dialogs.md index 65149522..83ee7746 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/firefox-dialogs.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/firefox-dialogs.md @@ -4,14 +4,14 @@ page_title: Firefox Dialogs description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 1 --- -#How to Handle Firefox Dialogs# +# How to Handle Firefox Dialogs Firefox dialogs require special attention because some of them are not standard Win32 dialogs, for example Firefox's download manager dialog. As a result the usual method for handing dialogs does not work with Firefox dialogs. Here is what the download manager dialog looks like:
- - + +
![Firefox download manager dialog window][1]

**Firefox download manager dialog window**
![Firefox download manager dialog window after download completes][2]

**Firefox download manager dialog window after download completes**
Firefox download manager dialog window

**Firefox download manager dialog window**
Firefox download manager dialog window after download completes

**Firefox download manager dialog window after download completes**
@@ -21,7 +21,7 @@ The other thing we discover about this dialog is that the Clear List button and Let's start implementing our dialog handler. First we'll need some local class variables and property accessors: -```C# +````C# using System; using System.Threading; @@ -106,10 +106,8 @@ namespace WebTesting set {this._currentState = value; } } #endregion -``` - - -```VB +```` +````VB Public Class FFDownloadsDialog Implements ArtOfTest.WebAii.Win32.Dialogs.IDialog @@ -140,16 +138,16 @@ Public Class FFDownloadsDialog ' Semaphore used by the WaitUntilHandled function. ' Private _autoEvent As AutoResetEvent = New AutoResetEvent(False) -#End Region +# End Region -#Region "Private Constants" +# Region "Private Constants" ' ' The title of the dialog we want handled. ' Private Const DIALOG_TITLE As String = "Downloads" -#End Region +# End Region -#Region "Properties" +# Region "Properties" ' ' Gets the Window object of the dialog being handled. ' @@ -200,37 +198,35 @@ Public Class FFDownloadsDialog Me._currentState = value End Set End Property -#End Region -``` +# End Region +```` So far everything is very simple and straightforward. Now that the local variables and properties are complete, it's time to implement the constructor. Since all we're going to do to handle the dialog is close it, we don't require the Desktop or DialogButton parameter that standard Win32 dialog handlers require: -```C# -#region Constructor +````C# +# region Constructor /// /// Create the dialog. /// public FFDownloadsDialog() { } -#endregion -``` - - -```VB -#Region "Constructor" +# endregion +```` +````VB +# Region "Constructor" ' ' Create the dialog handler instance. ' Public Sub New() MyBase.New() End Sub -#End Region -``` +# End Region +```` Since there's nothing to the constructor, we could optionally leave it out and let the default constructor take over. So let's start implementing the IDialog methods starting with IsDialogActive. -```C# -#region IDialog Members +````C# +# region IDialog Members /// /// Check whether the dialog is present or not. This function is /// called by the DialogMonitor object. @@ -263,10 +259,8 @@ public bool IsDialogActive(ArtOfTest.WebAii.Win32.WindowCollection dialogs) } return true; } -``` - - -```VB +```` +````VB ' ' Check whether the dialog is present or not. This function is ' called by the DialogMonitor object. @@ -297,7 +291,7 @@ Public Function IsDialogActive(ByVal dialogs As ArtOfTest.WebAii.Win32.WindowCol End If Return True End Function -``` +```` Because the DialogMonitor object passes in a **WindowCollection** of windows that have a class name of "#**32770**" and the FireFox dialog has the class name "**MozillaUIWindowClass**" we have to ignore the passed in WindowCollection and perform our own FindWindowRecursively. Once a window with the right caption is found we still need to verify it has the right class name. @@ -305,7 +299,7 @@ Detecting when the download manager has finished downloading files is a little b Now we need to implement the Handle function: -```C# +````C# /// /// This is called by the DialogMonitor whenever IsDialogActive returns true. /// @@ -334,10 +328,8 @@ public void Handle() } } } -``` - - -```VB +```` +````VB ' ' This is called by the DialogMonitor whenever IsDialogActive returns true. ' @@ -361,7 +353,7 @@ Implements ArtOfTest.WebAii.Win32.Dialogs.IDialog.Handle End Try End If End Sub -``` +```` The normal action we want our custom dialog handler to perform is to simply close the window. This is easily accomplished with this.Window.Close. Once the handler sends to the window the close command we wait up to 500 milliseconds for it to actually go away. We also trigger a semaphore so that the main test thread can be notified that the dialog has been handled. @@ -369,7 +361,7 @@ Optionally our handler code will call a custom handler function if the delegate Lastly we need to implement the WaitUntilHandled function: -```C# +````C# /// /// /// May be called by test code. Waits up to the specific time out @@ -394,10 +386,8 @@ Lastly we need to implement the WaitUntilHandled function: } } } -``` - - -```VB +```` +````VB ' ' ' May be called by test code. Waits up to the specific time out @@ -419,9 +409,7 @@ Lastly we need to implement the WaitUntilHandled function: End Sub End Class -``` +```` The only thing really happening in this code is to wait on the semaphore to be set. If the semaphore is not set within the timeout period it throws a System.TimeoutException exception. Optionally it will also reset the HandleCount property prior to waiting for the semaphore. -[1]: images/firefox-dialogs/fig1.png -[2]: images/firefox-dialogs/fig2.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/html-popups.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/html-popups.md index d95e7831..71012357 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/html-popups.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/html-popups.md @@ -4,7 +4,7 @@ page_title: HTML Popups description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#Handling HTML Pop-ups# +# Handling HTML Pop-ups HTML Pop-up are simply browser instances that are invoked by some action on an element of the page. These pop-ups are mostly invoked by calling window.open() from JavaScript. Customers use this method to prompt the user for information without interrupting the current browser instance the user is working in or to simply open new web pages in new browser instances to show side or detailed information. @@ -12,21 +12,19 @@ Given that these pop-ups are just like any other browser instance, the framework Given that HTML pop-up dialogs are launched through some actions on the page and not through an explicit call to Manager.LaunchNewBrowser(), the framework has no idea which new browser instances you want connected and added to the Manager.Browsers[] collection versus the ones you want ignored. Therefore, you need to notify the framework about the browser instances that you want to be tracked by enabling new browser tracking. You enable manager tracking by calling: -```C# +````C# Manager.SetNewBrowserTracking(true); -``` - - -```VB +```` +````VB Manager.SetNewBrowserTracking(true) -``` +```` When new browser tracking is enabled, any new browser instance launched on the machine is automatically added to the Manager.Browsers[] collection. In addition the Manager.ActiveBrowser instance is automatically set to the last launched browser instance. You then have full access to that pop-up instance with its full DOM and the ability to execute automation actions against it just like any other browser instance. When the pop-up is closed using Browser.Close(), the instance is removed from the Manager.Browsers[] collection and the ActiveBrowser instance is again automatically re-assigned to the last active Browser object in the Manager.Browsers[] collection. The sample below demonstrates this support. Let's start with the following HTML page that invokes a HTML pop-up: -```HTML +````HTML HTMLPopups @@ -43,11 +41,11 @@ The sample below demonstrates this support. Let's start with the following HTML Invoke HTML Popup -``` +```` The automation code that allows us to connect to that new instance looks like this: -```C# +````C# // Set new browser tracking to enabled. // This will make all new browser instances connect to // the Manager. @@ -76,10 +74,8 @@ ActiveBrowser.Close(); // the last launched active instance. Assert.IsTrue(Manager.Browsers.Count == 1); Assert.IsTrue(ActiveBrowser.Url.Contains("PAGE_NAME.com")); -``` - - -```VB +```` +````VB ' Set new browser tracking to enabled. ' This will make all new browser instances connect to ' the Manager. @@ -108,16 +104,14 @@ ActiveBrowser.Close() ' the last launched active instance. Assert.IsTrue(Manager.Browsers.Count = 1) Assert.IsTrue(ActiveBrowser.Url.Contains("PAGE_NAME.com")) -``` +```` Sometimes you need to close the popup by clicking on a button instead of just closing the window. Telerik Testing Framework supports this functionality with an additional paramter to the HtmlControl.Click function. By passing in a 'true' the framework expects the window to close. The ActiveBrowser is also set to the browser window that was open prior to the popup opening. -```C# +````C# Find.ById("button1").Click(true); // Here we tell the framework that this click causes the browser window to close -``` - - -```VB +```` +````VB Find.ById(Of HtmlInputButton)("button1").Click(True) ' Here we tell the framework that this click causes the browser window to close -``` +```` diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/firefox-dialogs/fig1.png b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/firefox-dialogs/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/firefox-dialogs/fig2.png b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/firefox-dialogs/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/modal-dialogs/fig1.png b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/images/modal-dialogs/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/modal-dialogs.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/modal-dialogs.md index 5a85065c..1738a42e 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/modal-dialogs.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/modal-dialogs.md @@ -4,7 +4,7 @@ page_title: Modal Dialogs description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#Handling IE Modal Dialogs# +# Handling IE Modal Dialogs ![Modal Dialog][1] @@ -12,7 +12,7 @@ The main difference between IE modal dialogs and the HTML Pop-ups is that the mo IE modal dialogs require special handling. They don't act like standard HTML pop-up windows, which means the standard approach does not work. Here is an example of how to code for the IE modal dialog special case: -```C# +````C# [TestMethod] [Description("How to access and handle IE's modal dialogs")] public void IEModalDialogsSupport() @@ -47,10 +47,8 @@ public void IEModalDialogsSupport() // The ActiveBrowser is back to the main browser window. ActiveBrowser.NavigateTo("http://www.google.com"); } -``` - - -```VB +```` +````VB _ Public Sub IEModalDialogsSupport() @@ -89,7 +87,7 @@ Public Sub IEModalDialogsSupport() ActiveBrowser.NavigateTo("http://www.google.com") End Sub -``` +```` [1]: images/modal-dialogs/fig1.png diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/win32-dialogs.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/win32-dialogs.md index 31745d6e..0f08816f 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/win32-dialogs.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/html-popups-and-dialogs-wtc/win32-dialogs.md @@ -4,11 +4,11 @@ page_title: Logon Dialogs description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#Logon Dialogs# +# Logon Dialogs With Logon dialogs, you need to pass in the username/password that you want used and how the dialog should be handled. Your options for the Logon dialog are: DialogButton.OK, DialogButton.CANCEL or DialogButton.CLOSE. -```C# +````C# // Add a logon dialog support with username/password Manager.DialogMonitor.AddDialog(new LogonDialog(ActiveBrowser, "", "", DialogButton.OK)); Manager.DialogMonitor.Start(); @@ -17,9 +17,8 @@ Manager.DialogMonitor.Start(); ActiveBrowser.NavigateTo(""); // Dialog should be automatically handled -``` - -```VB +```` +````VB ' Add a logon dialog support with username/password Manager.DialogMonitor.AddDialog(New LogonDialog(ActiveBrowser, "", "", DialogButton.OK)) Manager.DialogMonitor.Start() @@ -28,7 +27,7 @@ Manager.DialogMonitor.Start() ActiveBrowser.NavigateTo("") ' Dialog should be automatically handled -``` +```` > **To compile the above code include the following using:** > > using ArtOfTest.WebAii.Win32.Dialogs; diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/check-javascript-errors.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/check-javascript-errors.md index fbcf7cd4..a4dc82c9 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/check-javascript-errors.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/check-javascript-errors.md @@ -4,16 +4,13 @@ page_title: Check Javascript Errors - Test Studio Dev Documentation description: Check Javascript Errors position: 4 --- -# Check for JavaScript Errors # +# Check for JavaScript Errors Telerik Testing Framework allows you to verify if there are any JavaScript errors on the currently loaded page. The below example demonstrates how to collect the errors in a list and a possible approach how to use these. The sample code will fail the test if there are errors on the page. > The page in the current example does not actually contain JavaScript errors. Therefore these are invoked on purpose to demonstrate the feature. -#### __[C#]__ - - {{region }} - +````C# // Navigate to a page Manager.ActiveBrowser.NavigateTo("https://www.google.com"); @@ -45,7 +42,7 @@ Telerik Testing Framework allows you to verify if there are any JavaScript error // Assert if there are any errors on the current page Assert.AreEqual(0, currentErrorsOnPage.Count()); - {{endregion}} +```` > __Note:__ The JS error check step detects only JavaScript errors. Any errors related to not loaded resources will not be detected. An example for such console error is listed below:

diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/invoking-javascript.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/invoking-javascript.md index 3ca21c63..65383915 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/invoking-javascript.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/invoking-javascript.md @@ -5,7 +5,7 @@ description: "Test Studio is an innovative and easy-to-use automated web, WPF an previous_url: /user-guide/write-tests-in-code/advanced-topics/javascript/invoking-javascript.aspx, /user-guide/write-tests-in-code/advanced-topics/javascript/invoking-javascript position: 1 --- -#Invoking Javascript# +# Invoking Javascript Telerik Testing Framework supports directly invoking JavaScript functions from your .NET test code. One key advantage to this support is that you can use it to do your JavaScript unit testing without having to integrate yet another unit testing framework into your development environment. You can also avoid having to learn/support this additional framework. Abilities include: @@ -19,11 +19,11 @@ Telerik Testing Framework supports directly invoking JavaScript functions from y * Perform logging/tracing of your JavaScript routines. The logging is done directly into the unified log you are using. -##Invoking JavaScript Functions## +## Invoking JavaScript Functions The Actions.InvokeScript() enables you to simply provide a JavaScript function name to invoke. For example: -```C# +````C# // Assume our page has JavaScript method Test1() & Test2() & Test3() // Call a JavaScript function. @@ -39,10 +39,10 @@ string jsRetValue = Actions.InvokeScript("Test3();"); // Call a JavaScript function that returns a value int val = Actions.InvokeScript(@"Test3(""Bear"", ""Utah"")"); -``` +```` -```VB +````VB ' Assume our page has JavaScript method Test1() & Test2() & Test3() ' Call a JavaScript function. @@ -58,21 +58,21 @@ Dim jsRetValue As String = Actions.InvokeScript("Test3();") ' Call a JavaScript function that returns a value Dim val As Integer = Actions.InvokeScript(Of Integer)("Test3(""Bear"", ""Utah"")") -``` +```` Here is a code which calls an Angular function against input field: -```C# +````C# Actions.InvokeScript("angular.element(" + element.ClientSideLocator + ").val('" + text.Replace("'", "\\'") + "').triggerHandler('input')"); -``` +```` -##JavaScript Unit Testing Using NUnit or Visual Studio Team Test## +## JavaScript Unit Testing Using NUnit or Visual Studio Team Test Below is an example of how you can define JavaScript unit tests that is consistent with the rest of your tests and manages their execution and reporting using the same unit testing infrastructure, whether it is NUnit or Visual Studio Team Test. -```C# +````C# [TestMethod] public void JsUnitTest1() { @@ -80,18 +80,16 @@ public void JsUnitTest1() string strBool = Actions.InvokeScript("JsUnitTest1()"); Assert.IsTrue(bool.Parse(strBool)); } -``` - - -```VB +```` +````VB _ Public Sub JsUnitTest1() ' return 'true' for pass or 'false' for fail. Dim strBool As String = Actions.InvokeScript("JsUnitTest1()") Assert.IsTrue(Boolean.Parse(strBool)) End Sub -``` +```` -###See also +### See also * jQuery events do not fire \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-events.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-events.md index 84af85b8..ac2f7fc7 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-events.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-events.md @@ -4,13 +4,13 @@ page_title: JavaScript Events description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#JavaScript Events# +# JavaScript Events -##Invoking JavaScript Events## +## Invoking JavaScript Events Telerik Testing Framework allows you to invoke JavaScript events directly with or without event arguments. For example: -```C# +````C# // Invoke the OnFocus event HtmlButton b = Find.ById("b"); b.InvokeEvent(ScriptEventType.OnFocus); @@ -25,10 +25,8 @@ MouseEvent me = new MouseEvent(); me.Type = "mouseover"; me.SetRelatedTarget(body1); area1.InvokeEvent(me); -``` - - -```VB +```` +````VB ' Invoke the OnFocus event Dim b As HtmlButton = Find.ById(Of HtmlButton)("b") b.InvokeEvent(ScriptEventType.OnFocus) @@ -43,13 +41,13 @@ Dim [me] As New MouseEvent() [me].Type = "mouseover" [me].SetRelatedTarget(body1) area1.InvokeEvent([me]) -``` +```` -##JavaScript Event Handlers## +## JavaScript Event Handlers The framework gives you the ability to attach a .NET event handler to your JavaScript happening in the browser. Start by defining your event handler like this: -```C# +````C# private volatile bool _clickHandled; private System.Threading.AutoResetEvent _clickARE; @@ -58,10 +56,8 @@ private void OnClick(object sender, JavascriptEventArgs e) _clickHandled = true; _clickARE.Set(); } -``` - - -```VB +```` +````VB Private _clickHandled As Boolean _clickHandled Private _clickARE As System.Threading.AutoResetEvent @@ -70,11 +66,11 @@ Private Sub OnClick(ByVal sender As Object, ByVal e As JavascriptEventArgs) _clickHandled = True _clickARE.[Set]() End Sub -``` +```` All that's left is to attach the event handler to an element on the DOM like this: -```C# +````C# [TestMethod] public void ClickHandler() { @@ -94,10 +90,8 @@ public void ClickHandler() Assert.IsTrue(_clickHandled); } -``` - - -```VB +```` +````VB _ Public Sub ClickHandler() _clickARE = New System.Threading.AutoResetEvent(False) @@ -116,4 +110,4 @@ Public Sub ClickHandler() Assert.IsTrue(_clickHandled) End Sub -``` \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-logging.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-logging.md index f6832cbe..8c52dc73 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-logging.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/javascript-logging.md @@ -4,13 +4,13 @@ page_title: Logging from JavaScript description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Logging from JavaScript# +# Logging from JavaScript Telerik Testing Framework also supports logging directly from JavaScript into the unified test log that your tests are using. Logging from JavaScript is not enabled by default and needs to be explicitly enabled globally by setting the **Settings.EnableScriptLogging = true** via the Settings Class or setting **enableScriptLogging="true"** in the application .config file. In addition each page that wants to perform logging needs to include the WebAii_Logging.js file. You will find this file installed in the %InstallDir%\Bin folder. Below is a sample to demonstrate how to perform logging from your JavaScript routines: -```C# +````C# // Settings.Current.EnableScriptLogging must be set to true before // LaunchNewBrowser. This was done in the Initialize section of // this test. @@ -28,10 +28,8 @@ Settings.Current.EnableScriptLogging = false; // NOTE: Once script logging is disabled, any logging calls from // the script will be ignored and won't cause a script error. -``` - - -```VB +```` +````VB ' Settings.Current.EnableScriptLogging must be set to true before ' LaunchNewBrowser. This was done in the Initialize section of ' this test. @@ -49,13 +47,13 @@ Settings.Current.EnableScriptLogging = False ' NOTE: Once script logging is disabled, any logging calls from ' the script will be ignored and won't cause a script error. -``` +```` The page script function Test5() can perform logging like this: -```JavaScript +````JavaScript function Test5() { WebAiiLog("Trace", "Test5: Log this message!"); } -``` +```` diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/json-objects.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/json-objects.md index 87380f16..f8e6f068 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/json-objects.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/javascript-wtc/json-objects.md @@ -4,13 +4,13 @@ page_title: JSON Objects description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 5 --- -#Handling JSON Objects# +# Handling JSON Objects Your tests can understand JSON (JavaScript Object Notation) and can handle strongly typed objects returned from JavaScript. This might be a bit advanced for regular testers implementing test automation. However, if you are building mini-frameworks on top of Telerik Testing Framework, it is a great tool to help you get rid of having to parse complex strings returned by the InvokeScript function. This is a basic example of how to use JSON: -```C# +````C# [TestMethod] public void KeyValuePairs() { @@ -23,10 +23,8 @@ public void KeyValuePairs() Assert.AreEqual("value1", o["root"]["key1"]); Assert.AreEqual("value2", o["root"]["key2"]); } -``` - - -```VB +```` +````VB _ Public Sub KeyValuePairs() Manager.LaunchNewBrowser() @@ -37,11 +35,11 @@ Public Sub KeyValuePairs() Assert.AreEqual(Of String)("value1", o("root")("key1")) Assert.AreEqual(Of String)("value2", o("root")("key2")) End Sub -``` +```` In this example we define our own object in a Data Contract: -```C# +````C# [DataContract] public class MyObject { @@ -59,10 +57,8 @@ public void ReturnObject() Assert.AreEqual(1, o.One); Assert.AreEqual(15, o.Fifteen); } -``` - - -```VB +```` +````VB _ Public Class MyObject Private _One As Integer @@ -94,11 +90,11 @@ Public Sub ReturnObject() Assert.AreEqual(Of Integer)(1, o.One) Assert.AreEqual(Of Integer)(15, o.Fifteen) End Sub -``` +```` In this example we'll access an array returned by InvokeScript, treat it as JSON, and parse it manually for its values. -```C# +````C# var actions = Manager.Current.ActiveBrowser.Actions; JsonObject result = actions.InvokeScript ("window.my_list=[1,2,3]"); JsonArray arr = (JsonArray)result["root"]; @@ -107,10 +103,8 @@ for (int i = 0; i < 3; i++) double val = arr[i]; Log.WriteLine(val.ToString()); } -``` - - -```VB +```` +````VB Dim actions = Manager.Current.ActiveBrowser.Actions Dim result As JsonObject = actions.InvokeScript(Of JsonObject)("window.my_list=[1,2,3]") Dim arr As JsonArray = DirectCast(result("root"), JsonArray) @@ -118,4 +112,4 @@ For i As Integer = 0 To 2 Dim val As Double = arr(i) Log.WriteLine(val.ToString()) Next -``` \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/multi-browser-support.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/multi-browser-support.md index c828e76e..4126b79c 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/multi-browser-support.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/multi-browser-support.md @@ -5,12 +5,12 @@ description: "Test Studio is an innovative and easy-to-use automated web, WPF an previous_url: /user-guide/write-tests-in-code/advanced-topics/multi-browser-instance-support.aspx, /user-guide/write-tests-in-code/advanced-topics/multi-browser-instance-support position: 3 --- -#Multi-Browser Instance Support# +# Multi-Browser Instance Support Throughout the Telerik Testing Framework tutorials, we've been focusing only on the single browser instance 'ActiveBrowser,' given that it is the most common usage in web automation. Multi-browser instance automation within one session of the Manager object is supported, however. Having different types of browsers being automated within the same session is also supported. For example, within one test case session, you can automate two Internet Explorer browser instances and one Firefox instance all running concurrently. Such types of automation might not be very common but might be useful for certain specialized scenarios. (i.e. you could use this feature to do bitmap comparison across different browser types by capturing browser images from one instance and comparing it to the captured image from another instance). -##How It Works## +## How It Works The 'Manager' object is the main object that keeps tracks of all active browser instances using the Manager.Browsers[] collection. Users can launch as many instances as they want by using the 'Manager.LaunchNewBrowser()' method. Each time a new browser is launched, the 'Manager' creates the new 'Browser' object corresponding to that browser instance and adds it to the Browsers[] collection. The 'ActiveBrowser' property exposed off the 'Manager' is actually the last launched browser and should be the last browser instance in the 'Browsers[]' collection. @@ -18,7 +18,7 @@ The 'Manager' object is the main object that keeps tracks of all active browser The below sample demonstrates how you can leverage the multi-browser support to automate multiple instances of a browser within one test case. Such testing might be needed when performing concurrency testing in your web app. -```C# +````C# // Launch a new instance of IE Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true); @@ -56,10 +56,8 @@ ie.Window.SetFocus(); // You can also choose to set a timeout as shown below to double check that the // browser has actually closed and its handle is no longer visible. ff.Close(40); -``` - - -```VB +```` +````VB ' Launch a new instance of IE Manager.LaunchNewBrowser(BrowserType.InternetExplorer, True) @@ -97,4 +95,4 @@ ie.Window.SetFocus() ' You can also choose to set a timeout as shown below to double check that the ' browser has actually closed and its handle is no longer visible. ff.Close(40) -``` \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/Introduction.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/Introduction.md index 9955f3db..1e7977a1 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/Introduction.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/Introduction.md @@ -4,11 +4,11 @@ page_title: Introduction to TestRegions description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 1 --- -#Introduction to TestRegions# +# Introduction to TestRegions Building testability and agility into your markup applications. -##What Are TestRegions? (*)## +## What Are TestRegions? (*) TestRegions are simple innovations that bring a new perspective to automated software testing by breaking the traditional silos between application authoring and testing. They pave the way to a better and more robust test automation while enhancing the agility of the overall development lifecycle. TestRegions are hopefully a first step that others can use and build upon to usher a new generation of tools and methodologies that bring new advancements in the art of software testing and quality assurance. @@ -28,7 +28,7 @@ Some of the key benefits of TestRegions are: To help demonstrate these benefits, we will be using the following simple markup page as our sample application through out this tutorial. -```HTML +````HTML Basic TestRegion's Usage @@ -65,9 +65,9 @@ To help demonstrate these benefits, we will be using the following simple markup -``` +```` -##Current Automation Practices## +## Current Automation Practices Before digging into TestRegions, let's first take a look at some of the current common automation approaches for markup applications and understand their characteristics, challenges and drawbacks. @@ -92,25 +92,25 @@ To clarify this point more, let's take a simple example: With that being said, it is important to note that TestRegions DO NOT completely eradicate the need for ids/names but instead they augment the current use of ids/names and common automation practices to help address some of the issues mentioned above and add more structure and consistency to test automation. -##Using TestRegions## +## Using TestRegions Let's start by using TestRegions in the above sample to provide a structured approach to accessing this application from test automation. To do so, we need to inject TestRegions within our application markup. The TestRegions supported by Telerik Testing Framework Automation Infrastructure are: -```HTML +````HTML ...region content... -``` +```` Given that these are custom tags and are currently not handled as expected in latest browsers (for example, in Firefox, custom tags - even if they are Xhtml defined with extended dtd - are always included with the closing tag right after the open tag regardless of the tag content), the comment version of these tags is supported: -```HTML +````HTML ...region content... -``` +```` Using these tags as comments is a very unintrusive approach to the overall application and is completely compliant with markup standards like XHTML and XML. Let's start by defining two logical regions within our sample application above that we want to target in our automated testing. The page below shows the sample above with the following two logical regions defined: userinput, restaurantdata. -```HTML +````HTML Basic TestRegion's Usage @@ -151,23 +151,21 @@ Let's start by defining two logical regions within our sample application above -``` +```` With test regions defined, our test code can directly access these regions regardless of their nesting or positioning as follows: -```C# +````C# TestRegion userInput = Manager.ActiveBrowser.Regions["userinput"]; TestRegion restaurantData = Manager.ActiveBrowser.Regions["restaurantdata"]; -``` - - -```VB +```` +````VB Dim userInput As TestRegion = Manager.ActiveBrowser.Regions("userinput") Dim restaurantData As TestRegion = Manager.ActiveBrowser.Regions("restaurantdata") -``` +```` Each TestRegion above represents the part of the application as defined by the TestRegio's that are part of the application. It is worth noting here that the TestRegions collection accessor is case-insensitive to avoid test failures due to id casing mistakes. -##Identifying Elements Using TestRegions## +## Identifying Elements Using TestRegions Now that we know how to define test regions as part of an application under test and how to access them from our automated test code, our next step is to be able to access elements contained in these TestRegions to perform actions on or extract data from. @@ -179,24 +177,22 @@ Each TestRegion object has two properties that provide access to the elements co For example, to locate the restaurants table in the above sample, you can write: -```C# +````C# TestRegion restaurantData = Manager.ActiveBrowser.Regions["restaurantdata"]; // Given that the table is the first table within the 'restaurantdata' test region, it has an occurrence index of '0' Element restaurantTable = restaurantData.Find.ByTagIndex("table", 0); -``` - - -```VB +```` +````VB Dim restaurantData As TestRegion = Manager.ActiveBrowser.Regions("restaurantdata") ' Given that the table is the first table within the 'restaurantdata' test region, it has an occurrence index of '0' Dim restaurantTable As Element = restaurantData.Find.ByTagIndex("table", 0) -``` +```` Once you have access to the Element object, you can now use it to extract information from or execute actions on. For example: -```C# +````C# // access the userinput test region. TestRegion userInput = Manager.ActiveBrowser.Regions["userinput"]; @@ -205,10 +201,8 @@ Element zipCodeTextBox = userInput.Find.ByXPath("//input[2]"); // Perform an action on the element. Manager.ActiveBrowser.Actions.SetText(zipCodeTextBox, "90210"); -``` - - -```VB +```` +````VB ' access the userinput test region. Dim userInput As TestRegion = Manager.ActiveBrowser.Regions("userinput") @@ -217,11 +211,11 @@ Dim zipCodeTextBox As Element = userInput.Find.ByXPath("/input[2]") ' Perform an action on the element. Manager.ActiveBrowser.Actions.SetText(zipCodeTextBox, "90210") -``` +```` In the first sample above, the test will not be impacted by any changes to the application regardless of how many 'table' tags get added before or after that testregion. You can even extract that testregion and embed it in a different portion of a different application and all tests that target that region will still work as expected. Same with the second sample. -##Summary## +## Summary The samples above introduce you to basic usage of TestRegions as part of the Telerik Testing Framework Automation Infrastructure. They also demonstrate how you can utilize this approach to build robust test automation code that exhibit low maintenance cost and is highly resilient to undesired test breaks. Moreover, they demonstrate how to use a consistent and structured approach to identify application segments to target for automation while making test code more legible and faster to learn and understand. TestRegions can enhance the agility of development teams and fits nicely within an agile development environment. diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/asp-net-tr-control.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/asp-net-tr-control.md index fb5c96c4..8a6516dd 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/asp-net-tr-control.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/test-regions-wtc/asp-net-tr-control.md @@ -4,7 +4,7 @@ page_title: Asp.NET TR Control description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 2 --- -#Using Asp.Net TestRegion Control# +# Using Asp.Net TestRegion Control TestRegions can be a powerful tool to build testability into your web applications and enable your test automation teams to build highly resilient test beds that have low maintenance costs compared to the traditional automation methods like the HTTP record/replay approaches. TestRegions are ideal to be used with dynamic web frameworks like ASP.NET since they can take out some of the complexity that comes with the auto generated html. Given that TestRegions are injected in the source code of web pages, we wanted to provide Visual Studio and ASP.NET developers a richer experience at design time. Telerik Testing Framework includes an ASP.NET TestRegion Custom Control that can be used just like any other asp: control to define TestRegion's into your code. This control allows you to: @@ -20,7 +20,7 @@ Below is a segment of the HTML persisted that is shown in design view above. **Note:** The samples shown above are included in full in the code samples installed with Telerik Testing Framework. -##Adding ASP.NET TestRegion Control to Your Toolbox## +## Adding ASP.NET TestRegion Control to Your Toolbox To be able to use this control as shown above, you simply need to add it first to your ToolBox. Visual Studio should handle all tag registrations once you drag-n-drop the control on your pages. To add the control to your toolbox: diff --git a/docs-teststudiodev/code-in-test/advanced-topics-wtc/using-the-http-proxy.md b/docs-teststudiodev/code-in-test/advanced-topics-wtc/using-the-http-proxy.md index 1686ece6..1fc4177a 100644 --- a/docs-teststudiodev/code-in-test/advanced-topics-wtc/using-the-http-proxy.md +++ b/docs-teststudiodev/code-in-test/advanced-topics-wtc/using-the-http-proxy.md @@ -4,7 +4,7 @@ page_title: Using the HTTP Proxy description: "Test Studio is an innovative and easy-to-use automated web, WPF and load testing solution. Test Studio tests support essential technologies like ASP.NET AJAX, Silverlight, PHP and MVC. HTML5, Testing framework, functional testing, performance testing, load testing, exploratory testing, manual testing." position: 3 --- -#Using the HTTP Proxy# +# Using the HTTP Proxy Telerik Testing framework includes the ArtOfTest.WebAii.Messaging.Http namespace. With it you have the ability to intercept raw HTTP traffic under the cover. Using the HTTP proxy you can intercept an HTTP request originating from the browser before it is sent to the web server and/or intercept HTTP responses coming from the web server just before they reach the browser and are rendered by it. This functionality opens up the framework to be used in a wider range of automation scenarios like: @@ -21,31 +21,45 @@ In this namespace you will find the following methods classes:
- + - + - + - + - + - + - +
ClassDescription
**HttpProxyManager** + +**HttpProxyManager** Manages the HTTP proxy agent.
**HttpRequest** + +**HttpRequest** Used to create and manipulate an HTTP request.
**HttpRequestEventArgs** + +**HttpRequestEventArgs** EventArgs subclass that wraps an HTTP request, and possibly the related response.
**HttpResponse** + +**HttpResponse** Class wrapper of an HTTP response.
**HttpResponseEventArgs** + +**HttpResponseEventArgs** EventArgs subclass that wraps an HTTP response and the related request.
**RequestListenerInfo** + +**RequestListenerInfo** Wraps a listener for BeforeRequest events from the proxy.
**ResponseListenerInfo** + +**ResponseListenerInfo** Wraps a listener for BeforeResponse events from the proxy.
@@ -53,15 +67,15 @@ In this namespace you will find the following methods classes: You must enable the HTTP proxy before you can start using it. This setting is turned off by default. This can be done either by adding the setting to your .config file or modifying the setting in the Settings object. To add the setting to your .config file add this to your .config file: -```XML +````XML -``` +```` To enable this setting in the Settings object, add code to your initialization section like this: -```C# +````C# // This will get a new Settings object. If a configuration // section exists, then settings from that section will be // loaded @@ -72,10 +86,8 @@ settings.Web.UseHttpProxy = true; // Now call Initialize again with your updated settings object Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine)); -``` - - -```VB +```` +````VB ' This will get a new Settings object. If a configuration ' section exists, then settings from that section will be ' loaded @@ -86,10 +98,10 @@ settings.UseHttpProxy = True ' Now call Initialize again with your updated settings object Initialize(settings, New TestContextWriteLine(AddressOf Me.TestContext.WriteLine)) -``` +```` Now that we have the HTTP proxy turned on we can start using it. Here's an example of how we would detect that a response coming back from the web server is an image response. -```C# +````C# [TestMethod] public void ImageDetection() { @@ -121,10 +133,8 @@ private void CheckTypeForImage(object sender, HttpResponseEventArgs e) e.Response.Headers["Content-Type"])); } } -``` - - -```VB +```` +````VB _ Public Sub ImageDetection() ' Launch a new browser window @@ -149,11 +159,11 @@ Private Sub CheckTypeForImage(ByVal sender As Object, ByVal e As HttpResponseEve Log.WriteLine([String].Format("Not an image; MIME type: {0}", e.Response.Headers("Content-Type"))) End If End Sub -``` +```` Let's go one step further. Suppose we want to verify that all of the images on the web page were smaller than 40Kb. We can accomplish this using code like this: -```C# +````C# [TestMethod] public void CheckImageSize() { @@ -179,10 +189,8 @@ private void Check(object sender, HttpResponseEventArgs e) _imageTooLarge = true; } } -``` - - -```VB +```` +````VB _ Public Sub CheckImageSize() ' Add our HTTP response event handler @@ -205,6 +213,6 @@ Private Sub Check(ByVal sender As Object, ByVal e As HttpResponseEventArgs) _imageTooLarge = True End If End Sub -``` +```` **Note:** If you are using **localhost** in the URL of the **NavigateTo** method it must contain a trailing '.' character like this: ActiveBrowser.NavigateTo("http://localhost./myTestPage") . This is an IE limitation where all URL's must contain a '.' character in them to be recognized properly when a proxy is in place. \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/access-oracle-database.md b/docs-teststudiodev/code-in-test/coded-samples/general/access-oracle-database.md index d7b48588..8d31f000 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/access-oracle-database.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/access-oracle-database.md @@ -25,29 +25,22 @@ For default installation the dll file could be found in the Oracle data base ins Include the following *usings* in the code. -#### __[C#]__ - - {{region }} - +````C# using Oracle.DataAccess.Client; using Oracle.DataAccess.Types; - {{endregion}} - -#### __[VB]__ - - {{region }} - - import Oracle.DataAccess.Client - import Oracle.DataAccess.Types - {{endregion}} +```` +````VB + Imports Oracle.DataAccess.Client + Imports Oracle.DataAccess.Types +```` ## Data Connection String An Oracle connection string is required to identify the database to connect to. Here is an example: -``` +```` Data Source=XE;User Id=SYSTEM;Password=pass; -``` +```` Different connection strings could be used. See here for more examples. @@ -55,10 +48,7 @@ Different connection strings could be used. See this example: -#### __[C#]__ - - {{region }} - +````C# string oradb = "Data Source=XE;User Id=SYSTEM;Password=pass;"; OracleConnection conn = new OracleConnection(oradb); @@ -82,7 +72,7 @@ This code runs a simple query against a database table similar to Elements Explorer via the Add To Project Elements feature from the Elements Menu. Now I can reference that element in code and data drive its input text: -#### __[C#]__ - - {{region }} - +````C# //Reference a column by name Pages.Bing.SbFormQText.Text = Data["Col1"].ToString(); //Reference a column by index (zero based) Pages.Bing.SbFormQText.Text = Data[0].ToString(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB 'Reference a column by name Pages.Bing.SbFormQText.Text = Data("Col1").ToString() 'Reference a column by index (zero based) Pages.Bing.SbFormQText.Text = Data(0).ToString() - {{endregion}} +```` This method can also be applied to a **Verification**: -#### __[C#]__ - - {{region }} - +````C# //Reference a column by name Assert.IsTrue(ActiveBrowser.ContainsText(Data["Col1"].ToString())); //Reference a column by index (zero based) Assert.IsTrue(ActiveBrowser.ContainsText(Data[0].ToString())); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB 'Reference a column by name Assert.IsTrue(ActiveBrowser.ContainsText(Data("Col1").ToString())) 'Reference a column by index (zero based) Assert.IsTrue(ActiveBrowser.ContainsText(Data(0).ToString())) - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/browser-specific-actions.md b/docs-teststudiodev/code-in-test/coded-samples/general/browser-specific-actions.md index 6e8ee705..0a129d7d 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/browser-specific-actions.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/browser-specific-actions.md @@ -20,10 +20,7 @@ The **RunsAgainst** Test Step Property allows you to choose against which browse You can put together a much more complex use-case by using a coded solution. Here's the code from the test sample. It demonstrates how to use a different search word based on browser type: -#### __[C#]__ - - {{region }} - +````C# ActiveBrowser.NavigateTo("http://www.telerik.com/"); //Navigate to the page @@ -49,12 +46,8 @@ You can put together a much more complex use-case by using a coded solution. He Find.ById("~btnSearchSubmit").Click(); //Click submit button System.Threading.Thread.Sleep(2000); //Wait a bit so we can see the result - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ActiveBrowser.NavigateTo("http://www.telerik.com/") 'Navigate to the page @@ -82,6 +75,6 @@ You can put together a much more complex use-case by using a coded solution. He 'Click submit button System.Threading.Thread.Sleep(2000) 'Wait a bit so we can see the result - {{endregion}} +```` [1]: images/run-against.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/custom-scripts-before-after.md b/docs-teststudiodev/code-in-test/coded-samples/general/custom-scripts-before-after.md index 9e9a46b0..7c3ea514 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/custom-scripts-before-after.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/custom-scripts-before-after.md @@ -18,61 +18,47 @@ First, create a coded step in order to generate a code-behind file. Then open th ### Visual Studio plugin -1.If your test doesn't contain any coded steps, click the Add Code-Behind File button. -2.If you test contains a coded step, right click it and select **View Code** to go to the code-behind file. +1. If your test doesn't contain any coded steps, click the Add Code-Behind File button. +2. If you test contains a coded step, right click it and select **View Code** to go to the code-behind file. -![View code][3] +![View code](images/fig3.png) -3.Write the override definition inside the BaseTest (but not inside another method/coded step). +3. Write the override definition inside the BaseTest (but not inside another method/coded step). ### The Override Definition The TestResult object lets you access the test results from the run that just finished (i.e. the one invoking the **OnAfterTestCompleted** method): -#### __[C#]__ - - {{region }} - +````C# public override void OnAfterTestCompleted(TestResult result) { string overall = Convert.ToString(result.Result); Log.WriteLine(overall); result.ExportToResultFile(@"C:\", result.TestName); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Overrides Sub OnAfterTestCompleted(result As TestResult) Dim overall As String = Convert.ToString(result.Result) Log.WriteLine(overall) result.ExportToResultFile("C:\", result.TestName) End Sub - {{endregion}} +```` The **OnBeforeTestStarted** method allows you to perform actions required for the initialization of your test (starting scripts, etc.): -#### __[C#]__ - - {{region }} - +````C# public override void OnBeforeTestStarted() { this.ExecuteTest("Folder1\\WebTest2.tstest"); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Overrides Sub OnBeforeTestStarted() Me.ExecuteTest("Folder1\WebTest2.tstest") End Sub - {{endregion}} +```` You can use logic from assemblies in these methods. First add references to the assemblies. -[3]: images/custom-scripts-before-after/fig3.png + diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/data-driven-find-expressions.md b/docs-teststudiodev/code-in-test/coded-samples/general/data-driven-find-expressions.md index 6cf09b55..d8a52a2c 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/data-driven-find-expressions.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/data-driven-find-expressions.md @@ -12,38 +12,29 @@ position: 1 The example below is against this Telerik demo site. -1.Record a *Navigate* to step. -2.Open the drop-down for the ComboBox. -3.Locate the parent element in the DOM Explorer (see below). Here the Unordered List holds all the child List Item elements. Right click it and select **Add to Project Elements**. +1. Record a *Navigate* to step. +2. Open the drop-down for the ComboBox. +3. Locate the parent element in the DOM Explorer (see below). Here the Unordered List holds all the child List Item elements. Right click it and select **Add to Project Elements**. -![Add to Project][1] + ![Add to Project](images/data-driven-find-expressions/fig1.png) -4.Insert a Coded Step. -5.Use the local data to enter values for the find expression. -6.We will use the Find.ByContent method in the coded step. More information can be found in our Finding Page Elements article. Here's the code for our Script Step: - -#### __[C#]__ - - {{region }} +4. Insert a Coded Step. +5. Use the local data to enter values for the find expression. +6. We will use the Find.ByContent method in the coded step. More information can be found in our Finding Page Elements article. Here's the code for our Script Step: +````C# HtmlListItem listItem = Pages.TelerikExtensionsForASP.UnorderedList.Find.ByContent(Data["Col1"].ToString()); Assert.IsNotNull(listItem); listItem.Click(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim listItem As HtmlListItem = Pages.TelerikExtensionsForASP.UnorderedList.Find.ByContent(Of HtmlListItem)(Data("Col1").ToString()) Assert.IsNotNull(listItem) listItem.Click() - {{endregion}} +```` + +7. Test Studio Dev uses the data table to find the element in the list, performs an Assert on it, and then clicks it. -7.Test Studio Dev uses the data table to find the element in the list, performs an Assert on it, and then clicks it. +![Execute test](images/data-driven-find-expressions/fig3.png) -![Execute test][3] -[1]: images/data-driven-find-expressions/fig1.png -[2]: images/data-driven-find-expressions/fig2.png -[3]: images/data-driven-find-expressions/fig3.png diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/execution-extensions.md b/docs-teststudiodev/code-in-test/coded-samples/general/execution-extensions.md index 2074a9a5..0b39e019 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/execution-extensions.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/execution-extensions.md @@ -29,52 +29,38 @@ Also add the following **.NET** references: 3.  Add the following using statements to the class file: -#### __[C#]__ - - {{region }} - +````C# using System.IO; using System.Data; using System.Data.OleDb; using System.Windows.Forms; using ArtOfTest.WebAii.Design.Execution; - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.IO Imports System.Data Imports System.Data.OleDb Imports System.Windows.Forms Imports ArtOfTest.WebAii.Design.Execution - {{endregion}} +```` 4.  The *ArtOfTest.WebAii.Design.Execution* namespace contains an IExecutionExtension that our class needs to implement: -#### __[C#]__ - - {{region }} - +````C# namespace ClassLibrary1 { public class Class1 : IExecutionExtension { } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Namespace ClassLibrary1 Public Class Class1 Implements IExecutionExtension End Class End Namespace - {{endregion}} +```` 5.  Right click on **IExecutionExtension** and select **Implement Interface > Implement Interface**. This displays all the methods and notifications exposed by Test Studio. Here are definitions for each **IExecutionExtension** member: @@ -82,10 +68,7 @@ Also add the following **.NET** references: - The rest of the functions, which you're not using, should be left empty (remove *throw new NotImplementedException*). -#### __[C#]__ - - {{region }} - +````C# namespace ClassLibrary1 { public class Class1 : IExecutionExtension @@ -139,12 +122,8 @@ Also add the following **.NET** references: #endregion } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Namespace ClassLibrary1 Public Class Class1 Implements IExecutionExtension @@ -191,7 +170,7 @@ Also add the following **.NET** references: #End Region End Class End Namespace - {{endregion}} +```` A few notes about the code above: @@ -215,10 +194,7 @@ Let's see an example using the **OnInitializeDataSource** method. This assumes t 1.  Add the following code to that method: -#### __[C#]__ - - {{region }} - +````C# public System.Data.DataTable OnInitializeDataSource(ExecutionContext executionContext) { System.Data.DataTable table = null; @@ -247,12 +223,8 @@ Let's see an example using the **OnInitializeDataSource** method. This assumes t thread.Join(); return table; } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Function OnInitializeDataSource(executionContext As ExecutionContext) As System.Data.DataTable Dim table As System.Data.DataTable = Nothing Dim thread = New System.Threading.Thread(Function(obj) @@ -276,14 +248,11 @@ Let's see an example using the **OnInitializeDataSource** method. This assumes t thread.Join() Return table End Function - {{endregion}} +```` 2.  Now add the following *ImportExcelXLS* method within the same public class: -#### __[C#]__ - - {{region }} - +````C# private static DataSet ImportExcelXLS(string FileName, bool hasHeaders) { string HDR = hasHeaders ? "Yes" : "No"; @@ -320,12 +289,8 @@ Let's see an example using the **OnInitializeDataSource** method. This assumes t } return output; } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Private Shared Function ImportExcelXLS(FileName As String, hasHeaders As Boolean) As DataSet Dim HDR As String = If(hasHeaders, "Yes", "No") Dim strConn As String = Nothing @@ -355,7 +320,7 @@ Let's see an example using the **OnInitializeDataSource** method. This assumes t End Using Return output End Function - {{endregion}} +```` 3.  Rebuild the class library, copy the resulting DLL file, and paste it into the Plugins folder (overwriting any other existing class library file). diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/extend-basewebaiitest-class.md b/docs-teststudiodev/code-in-test/coded-samples/general/extend-basewebaiitest-class.md index 79308837..c72d8fe6 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/extend-basewebaiitest-class.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/extend-basewebaiitest-class.md @@ -10,85 +10,71 @@ A possible scenario is to use same functionality in most of the tests in the pro The steps to implement such approach are as follows: -1.Create a new project +1. Create a new project -2.Add a stand alone class file *ExtendedBaseWebAiiTest* which inherits from the abstract class *BaseWebAiiTest*. A sample implementation of such file containing the method *PrintMessage()* is listed below: +2. Add a stand alone class file *ExtendedBaseWebAiiTest* which inherits from the abstract class *BaseWebAiiTest*. A sample implementation of such file containing the method *PrintMessage()* is listed below: -#### __[C#]__ +````C# +using ArtOfTest.WebAii.Design; - {{region }} - - using ArtOfTest.WebAii.Design; - - namespace ExtendBaseWebAiiTestProject +namespace ExtendBaseWebAiiTestProject +{ + public class ExtendedBaseWebAiiTest : BaseWebAiiTest + { + // this method will be available in each test code behind file coded step + public void PrintMessage(string message) { - public class ExtendedBaseWebAiiTest : BaseWebAiiTest - { - // this method will be available in each test code behind file coded step - public void PrintMessage(string message) - { - Log.WriteLine(message); - } - } + Log.WriteLine(message); } - {{endregion}} - -#### __[VB]__ + } +} +```` +````VB +Imports ArtOfTest.WebAii.Design - {{region }} +Namespace ExtendBaseWebAiiTestProject - Imports ArtOfTest.WebAii.Design + Public Class ExtendedBaseWebAiiTest + Inherits BaseWebAiiTest - Namespace ExtendBaseWebAiiTestProject - - Public Class ExtendedBaseWebAiiTest - Inherits BaseWebAiiTest - - Public Sub PrintMessage(ByVal message As String) - Log.WriteLine(message) - End Sub - End Class - End Namespace - {{endregion}} - -3.Open the code behind file of any test and modify its class to inherit the newly created _ExtendedBaseWebAiiTest_ class and the _PrintMessage()_ method defined in it will be available for the test. - -#### __[C#]__ - - {{region }} - - using ArtOfTest.WebAii.Core; - using ArtOfTest.WebAii.Design.Execution; - - namespace ExtendBaseWebAiiTestProject + Public Sub PrintMessage(ByVal message As String) + Log.WriteLine(message) + End Sub + End Class +End Namespace +```` + +3. Open the code behind file of any test and modify its class to inherit the newly created _ExtendedBaseWebAiiTest_ class and the _PrintMessage()_ method defined in it will be available for the test. + +````C# +using ArtOfTest.WebAii.Core; +using ArtOfTest.WebAii.Design.Execution; + +namespace ExtendBaseWebAiiTestProject +{ + public class WebTest : ExtendedBaseWebAiiTest + { + [CodedStep(@"Print From ExtendedBaseAiiTest Method")] + public void PrintCodedStep() { - public class WebTest : ExtendedBaseWebAiiTest - { - [CodedStep(@"Print From ExtendedBaseAiiTest Method")] - public void PrintCodedStep() - { - this.PrintMessage("This is printed from extended base class method"); - } - } + this.PrintMessage("This is printed from extended base class method"); } - {{endregion}} + } +} +```` +````VB +Imports ArtOfTest.WebAii.Core +Imports ArtOfTest.WebAii.Design.Execution -#### __[VB]__ +Namespace ExtendBaseWebAiiTestProject - {{region }} - - Imports ArtOfTest.WebAii.Core - Imports ArtOfTest.WebAii.Design.Execution - - Namespace ExtendBaseWebAiiTestProject + Public Class WebTest + Inherits ExtendedBaseWebAiiTest - Public Class WebTest - Inherits ExtendedBaseWebAiiTest - - - Public Sub PrintCodedStep() - Me.PrintMessage("This is printed from extended base class method") - End Sub - End Class - End Namespace - {{endregion}} + + Public Sub PrintCodedStep() + Me.PrintMessage("This is printed from extended base class method") + End Sub + End Class +End Namespace +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/external-log-file.md b/docs-teststudiodev/code-in-test/coded-samples/general/external-log-file.md index 0f2589b6..eac682eb 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/external-log-file.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/external-log-file.md @@ -20,10 +20,7 @@ We have code samples for two file types: ## Text File -#### __[C#]__ - - {{region }} - +````C# public IList stepResults { get; set; } public override void OnAfterTestCompleted(TestResult result) { @@ -42,12 +39,8 @@ We have code samples for two file types: file.WriteLine("Total Test Result: "+ overall); file.Close(); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Property stepResults() As IList(Of AutomationStepResult) Get Return m_stepResults @@ -73,7 +66,7 @@ We have code samples for two file types: file.WriteLine("Total Test Result: " & overall) file.Close() End Sub - {{endregion}} +```` Finally you'll need to add an Assembly Reference for *ArtOfTest.Common.Design*. If it is already present, remove it and add it again. Add it from the \**Test Studio\Bin** directory: @@ -85,10 +78,7 @@ Finally you'll need to add an Assembly Reference for *ArtOfTest.Common.Design*. * You'll need to create the Excel file on disk first. -#### __[C#]__ - - {{region }} - +````C# public override void OnAfterTestCompleted(TestResult result) { string passed = Convert.ToString(result.TotalPassedSteps); @@ -123,12 +113,8 @@ Finally you'll need to add an Assembly Reference for *ArtOfTest.Common.Design*. GC.Collect(); System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Overrides Sub OnAfterTestCompleted(result As TestResult) Dim passed As String = Convert.ToString(result.TotalPassedSteps) Dim notRunSteps As String = Convert.ToString(result.TotalNumberOfNotRunSteps) @@ -161,4 +147,4 @@ Finally you'll need to add an Assembly Reference for *ArtOfTest.Common.Design*. GC.Collect() System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp) End Sub - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/extracted-variables-in-code.md b/docs-teststudiodev/code-in-test/coded-samples/general/extracted-variables-in-code.md index fa6c276b..37e21534 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/extracted-variables-in-code.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/extracted-variables-in-code.md @@ -4,38 +4,24 @@ page_title: Get/Set Extracted Variables in Code - Test Studio Dev Documentation description: Get/Set Extracted Variables in Code position: 1 --- -# Get/Set Extracted Variables in Code # +# Get/Set Extracted Variables in Code Use the *SetExtractedValue()* method to set the value of an extraction variable so it can be used later in a standard action or verification step: -#### __[C#]__ - - {{region }} - +````C# string area = "Atlanta"; SetExtractedValue("extractedID", area); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim area As String = "Atlanta" SetExtractedValue("extractedID", area) - {{endregion}} +```` Use the *GetExtractedValue()* method to use the extracted variable in a coded step: -#### __[C#]__ - - {{region }} - +````C# object myData = GetExtractedValue("varname"); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim myData As Object = GetExtractedValue("varname") - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/fail-the-test.md b/docs-teststudiodev/code-in-test/coded-samples/general/fail-the-test.md index 3f75f0e0..5907ae90 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/fail-the-test.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/fail-the-test.md @@ -14,10 +14,7 @@ This is most easily achieved with standard (and non-coded) ("id=Grid", "|", "tagIndex=table:1"); Assert.IsNotNull(table); @@ -25,12 +22,8 @@ The following code contains basic examples for demonstration purposes: int r = table.Rows.Count; Assert.AreEqual(r, 10); Assert.IsTrue(table.InnerText.Contains("Mario")); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-mvc/grid") Dim table As HtmlTable = Find.ByExpression(Of HtmlTable)("id=Grid", "|", "tagIndex=table:1") Assert.IsNotNull(table) @@ -38,16 +31,13 @@ The following code contains basic examples for demonstration purposes: Dim r As Integer = table.Rows.Count Assert.AreEqual(r, 10) Assert.IsTrue(table.InnerText.Contains("Mario")) - {{endregion}} +```` ## Throw New Exception When an *Assert* statement is not appropriate, you can throw your own exception. In the example below, the *FileNotFoundException* will result in failure if the specified file does not exist on disk. -#### __[C#]__ - - {{region }} - +````C# string fileName = "C:\\test.txt"; if (System.IO.File.Exists(fileName) == true) @@ -58,12 +48,8 @@ When an *Assert* statement is not appropriate, you can throw your own exception. { throw new System.IO.FileNotFoundException("File does not exist: ", fileName); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim fileName As String = "C:\test.txt" If System.IO.File.Exists(fileName) = True Then @@ -71,4 +57,4 @@ When an *Assert* statement is not appropriate, you can throw your own exception. Else Throw New System.IO.FileNotFoundException("File does not exist: ", fileName) End If - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/access-sql-database/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/access-sql-database/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/custom-scripts-before-after/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/data-driven-find-expressions/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/fig3.png new file mode 100644 index 00000000..0285effd Binary files /dev/null and b/docs-teststudiodev/code-in-test/coded-samples/general/images/fig3.png differ diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/log-error-dialogs/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/log-error-dialogs/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/non-iterative-data-driving/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/non-iterative-data-driving/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/run-against.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/run-against.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/general/images/write-into-data-source/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/invoke-application.md b/docs-teststudiodev/code-in-test/coded-samples/general/invoke-application.md index 1681d797..734fe1d7 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/invoke-application.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/invoke-application.md @@ -4,33 +4,26 @@ page_title: How to Invoke an Application - Test Studio Dev Documentation description: How to Invoke an Application position: 1 --- -#How to Invoke an Application# +# How to Invoke an Application I want to invoke a desktop application (i.e. an .exe file) from a test step. -##Solution## +## Solution You can write your own code in a coded step that triggers the application you need. Here's a simple example taken from this article: -#### __[C#]__ - - {{region }} - +````C# System.Diagnostics.Process notePad = new System.Diagnostics.Process(); notePad.StartInfo.FileName = "notepad.exe"; notePad.StartInfo.Arguments = @"c:\myText.txt"; notePad.Start(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim notePad As New System.Diagnostics.Process() notePad.StartInfo.FileName = "notepad.exe" notePad.StartInfo.Arguments = "c:\myText.txt" notePad.Start() - {{endregion}} +```` * In the above sample, **C:\myText.txt** is the argument fed to **notepad.exe**. If you want to test this sample code, you'll need to create this file on your local disk first. Otherwise, the notepad application will throw a *file can't be found* error. diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/log-clipboard-text.md b/docs-teststudiodev/code-in-test/coded-samples/general/log-clipboard-text.md index 64c89438..d8c0eb24 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/log-clipboard-text.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/log-clipboard-text.md @@ -4,18 +4,15 @@ page_title: Log Clipboard Text - Test Studio Dev Documentation description: Log Clipboard Text position: 1 --- -#Log Clipboard Text# +# Log Clipboard Text *My test copies text into the Clipboard and I would like to log its content.* -##Solution## +## Solution Here is the full code-behind file, excluding the standard *using/Imports* statements and the Dynamic Pages Reference region: -#### __[C#]__ - - {{region }} - +````C# using System.Windows.Forms; using System.Threading; @@ -47,12 +44,8 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem } } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.Windows.Forms Imports System.Threading @@ -80,5 +73,5 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem End Sub End Class End Namespace - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/log-error-dialogs.md b/docs-teststudiodev/code-in-test/coded-samples/general/log-error-dialogs.md index 621acdf9..46743747 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/log-error-dialogs.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/log-error-dialogs.md @@ -4,13 +4,13 @@ page_title: Log Error Dialogs - Test Studio Dev Documentation description: Log Error Dialogs position: 1 --- -#Log Error Dialogs# +# Log Error Dialogs *My application can potentially display a dialog containing an error message during test execution. The dialog can appear multiple times and will not always appear at the same point in the test, therefore I cannot use a standard Dialog Handler step. I want to capture these error messages and automatically handle these dialogs if they appear.* -##Solution## +## Solution This is possible with a coded solution. The stipulation is that the dialog is displayed the same way and has the same title in each browser: @@ -24,10 +24,7 @@ This is possible with a coded solution. The stipulation is that the dialog is di Here is the full code-behind file, excluding the standard *using/Imports* statements and the Dynamic Pages Reference region: -#### __[C#]__ - - {{region }} - +````C# using System.Threading; using System.Windows.Forms; using ArtOfTest.WebAii.Win32.Dialogs; @@ -70,12 +67,8 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem } } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.Threading Imports System.Windows.Forms Imports ArtOfTest.WebAii.Win32.Dialogs @@ -113,6 +106,6 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem End Sub End Class End Namespace - {{endregion}} +```` [1]: images/log-error-dialogs/fig1.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/mouse-wheel-scroll.md b/docs-teststudiodev/code-in-test/coded-samples/general/mouse-wheel-scroll.md index 63f4e99e..8058eb22 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/mouse-wheel-scroll.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/mouse-wheel-scroll.md @@ -4,25 +4,18 @@ page_title: Mouse Wheel Scroll - Test Studio Dev Documentation description: Mouse Wheel Scroll position: 1 --- -#Mouse Wheel Scroll# +# Mouse Wheel Scroll *I need to invoke desktop mouse scroll actions on an HTML or Silverlight element (typically a scroll bar).* -##Solution## +## Solution This is doable with a coded solution. The code is desktop-based, which means it is not associated with an element in your Test Project. Because of this you will need to make sure that the intended target element has focus within the browser before the attempted mouse scroll action. Typically you can give an element focus by invoking a mouse click on it (via regular, non-coded step). Here's an example: -#### __[C#]__ - - {{region }} - +````C# Manager.Desktop.Mouse.TurnWheel(100, MouseWheelTurnDirection.Backward); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Manager.Desktop.Mouse.TurnWheel(100, MouseWheelTurnDirection.Backward) - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/non-iterative-data-driving.md b/docs-teststudiodev/code-in-test/coded-samples/general/non-iterative-data-driving.md index 6bb72ac0..fb6a0055 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/non-iterative-data-driving.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/non-iterative-data-driving.md @@ -4,15 +4,15 @@ page_title: Non-iterative Data Driving - Test Studio Dev Documentation description: Non-iterative Data Driving position: 1 --- -#Non-iterative Data Driving# +# Non-iterative Data Driving *Is there a way to data drive a step in a test script so that each time the script is run, the test step will select a different sequential row from the data source?* -##Solution## +## Solution The solution is to save the number of the row into an XML file. Each time you execute the test, read the number of the row from the XML file and tell Test Studio to use this row from your data source. -1.  Create an XML file which will contain the row number. +1. Create an XML file which will contain the row number. 1.1 Right-click somewhere in the project folder and select **New > Text Document**. Rename it to "IterationIndex.xml". @@ -20,18 +20,18 @@ The solution is to save the number of the row into an XML file. Each time you ex 1.3 Write the following code into the file: -```XML +````XML 0 -``` +```` -2.  Create your data source, if you don't have one already. In my case this is an Excel file called "foo.xlsx" containing numbers from 1 to 20. +2. Create your data source, if you don't have one already. In my case this is an Excel file called "foo.xlsx" containing numbers from 1 to 20. -![File][1] +![File](images/non-iterative-data-driving/fig1.png) -3.  Open or create your project in Test Studio. +3. Open or create your project in Test Studio. 3.1 Start new project or open existing project. @@ -47,10 +47,9 @@ The solution is to save the number of the row into an XML file. Each time you ex 3.5 Create a method which will save the row number into the XML file: -#### __[C#]__ - - {{region }} +````C# + public void SaveValue(int numVal) { string path = @"C:\Box\NextRowOnEachRun\IterationValue.xml"; @@ -58,26 +57,23 @@ The solution is to save the number of the row into an XML file. Each time you ex e.Add(new XElement("numVal", numVal)); e.Save(path); } - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + Public Sub SaveValue(numVal As Integer) Dim path As String = "C:\Box\NextRowOnEachRun\IterationValue.xml" Dim e As New XElement("IterationValue") e.Add(New XElement("numVal", numVal)) e.Save(path) End Sub - {{endregion}} +```` 3.6 Create a method which will load the row number from the XML file: -#### __[C#]__ - - {{region }} +````C# + public int LoadValue() { string path = @"C:\Box\NextRowOnEachRun\IterationValue.xml"; @@ -87,12 +83,10 @@ The solution is to save the number of the row into an XML file. Each time you ex return numVal; } - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + Public Function LoadValue() As Integer Dim path As String = "C:\Box\NextRowOnEachRun\IterationValue.xml" Dim e As XElement = XElement.Load(path) @@ -101,14 +95,13 @@ The solution is to save the number of the row into an XML file. Each time you ex Return numVal End Function - {{endregion}} +```` 3.7 Create a method which will read the row from the Excel file: -#### __[C#]__ - - {{region }} +````C# + public string ReadingExcel() { int rowValue = LoadValue(); @@ -130,12 +123,10 @@ The solution is to save the number of the row into an XML file. Each time you ex return value; } - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + Public Function ReadingExcel() As String Dim rowValue As Integer = LoadValue() Dim input As String = "C:\Box\NextRowOnEachRun\foo.xlsx" @@ -157,6 +148,5 @@ The solution is to save the number of the row into an XML file. Each time you ex Return value End Function - {{endregion}} +```` -[1]: images/non-iterative-data-driving/fig1.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/override-app-config.md b/docs-teststudiodev/code-in-test/coded-samples/general/override-app-config.md index 070de884..f9fe13ef 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/override-app-config.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/override-app-config.md @@ -4,11 +4,11 @@ page_title: Override app.config - Test Studio Dev Documentation description: Override app.config position: 1 --- -#Override the app.config File in a Test Studio Project# +# Override the app.config File in a Test Studio Project *I would like Visual Studio to load the app.config file to get its run-time configuration settings.* -##Solution## +## Solution > The app.config only applies to projects in Visual Studio as explained here. @@ -20,10 +20,7 @@ However, this doesn't work with a default Test Studio Dev project. A Test Studio * *System.Configuration* -#### __[C#]__ - - {{region }} - +````C# Assembly me = Assembly.GetExecutingAssembly(); Configuration config = ConfigurationManager.OpenExeConfiguration(me.ManifestModule.Assembly.Location); @@ -32,12 +29,8 @@ However, this doesn't work with a default Test Studio Dev project. A Test Studio string pw = config.AppSettings.Settings["Pass"].Value; string UserId = config.AppSettings.Settings["UserId"].Value; string conn = config.ConnectionStrings.ConnectionStrings["ConnectionString"].ConnectionString; - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim [me] As Assembly = Assembly.GetExecutingAssembly() Dim config As Configuration = ConfigurationManager.OpenExeConfiguration([me].ManifestModule.Assembly.Location) @@ -46,4 +39,4 @@ However, this doesn't work with a default Test Studio Dev project. A Test Studio Dim pw As String = config.AppSettings.Settings("Pass").Value Dim UserId As String = config.AppSettings.Settings("UserId").Value Dim conn As String = config.ConnectionStrings.ConnectionStrings("ConnectionString").ConnectionString - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/random-row.md b/docs-teststudiodev/code-in-test/coded-samples/general/random-row.md index f95f0d4b..985eb7b7 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/random-row.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/random-row.md @@ -4,11 +4,11 @@ page_title: Random Row - Test Studio Dev Documentation description: Random Row position: 1 --- -#Random Row from Excel Data Source# +# Random Row from Excel Data Source *Is there a way to data drive a step in a test script so that each time the script is run, the test step will select a random row from the Excel data source?* -##Solution## +## Solution In code, generate a random number based on the number of rows. Then use the corresponding text from that row's cell in the applicable test step. @@ -18,10 +18,7 @@ In code, generate a random number based on the number of rows. Then use the corr * **Note:** Ensure you Add an Assembly Reference to *Microsoft.Office.Interop.Excel*. You can download a version of that file on Microsoft's website that matches your version of MS Office. -#### __[C#]__ - - {{region }} - +````C# Random random = new Random(); int num = random.Next(1, 6); @@ -36,12 +33,8 @@ In code, generate a random number based on the number of rows. Then use the corr app = null; Pages.Bing.SbFormQText.Text = value; - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim random As New Random() Dim num As Integer = random.[Next](1, 6) @@ -58,5 +51,5 @@ In code, generate a random number based on the number of rows. Then use the corr app = Nothing Pages.Bing.SbFormQText.Text = value - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/send-keystrokes.md b/docs-teststudiodev/code-in-test/coded-samples/general/send-keystrokes.md index 62555940..735cf64b 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/send-keystrokes.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/send-keystrokes.md @@ -4,18 +4,15 @@ page_title: Send Keystorkes - Test Studio Dev Documentation description: Send Keystorkes position: 1 --- -#Send Keystorkes# +# Send Keystorkes *I want to send keystrokes like Alt+F4.* -##Solution## +## Solution Here is the full code-behind file, excluding the standard *using/Imports* statements and the *Dynamic Pages Reference* region: -#### __[C#]__ - - {{region }} - +````C# using System.Windows.Forms; namespace TestProject8 @@ -30,12 +27,8 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem } } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.Windows.Forms Namespace TestProject8 @@ -50,20 +43,17 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem End Sub End Class End Namespace - {{endregion}} +```` > Here you can find the list with key codes. *I want to perform multi-select while holding down the Ctrl key.* -##Solution## +## Solution Here is the full code-behind file, excluding the standard *using/Imports* statements and the *Dynamic Pages Reference* region: -#### __[C#]__ - - {{region }} - +````C# using System.Windows.Forms; namespace TestProject8 @@ -84,12 +74,8 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem } } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.Windows.Forms Namespace TestProject8 @@ -109,5 +95,5 @@ Here is the full code-behind file, excluding the standard *using/Imports* statem End Sub End Class End Namespace - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/skip-iteration.md b/docs-teststudiodev/code-in-test/coded-samples/general/skip-iteration.md index 13e4af01..30b366f2 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/skip-iteration.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/skip-iteration.md @@ -4,11 +4,11 @@ page_title: Skip Iteration - Test Studio Dev Documentation description: Skip Iteration position: 1 --- -#How to Skip a Specific Iteration While Executing a Data-Bound Test# +# How to Skip a Specific Iteration While Executing a Data-Bound Test *You're executing a data-driven test. You need to skip one or more iterations based on a specific condition.* -##Solution## +## Solution You'll need to create two tests. Let's call them **MainTest** and **Subtest**. Put the actual test steps you want to invoke (i.e. your test) in Subtest. @@ -16,39 +16,25 @@ Now it's time to bind your test to a data source. Make **MainTest** (which is st After this add **Subtest** via the Test as Step feature in MainTest. However, we're going to do that in a coded step. Here's what the code looks like: -#### __[C#]__ - - {{region }} - +````C# this.ExecuteTest("Subtest.tstest"); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Me.ExecuteTest("Subtest.tstest") - {{endregion}} +```` For each iteration of **MainTest**, Test Studio will attempt to implement this code and run **SubTest**. Now we can implement conditional logic which determines whether we execute the above logic. In effect, this will control whether a given iteration executes the **SubTest**. If it doesn't, the iteration is effectively skipped - it will invoke no actions of any consequence. We'll skip the iteration even though it won't seem so from **MainTest**'s point of view (i.e. all the iterations will be listed in **MainTest**'s Log file). Let's say we want to implement a data-driven test that navigates to random.org, generates a random number, and executes some steps if the number is even. First we record the required steps in MainTest. A step will Extract the generated number in a variable we're going to name num. Now we check whether this value is even and execute SubTest if it is: -#### __[C#]__ - - {{region }} - +````C# if (Convert.ToInt16(this.GetExtractedValue("num")) % 2 == 0 ) { this.ExecuteTest("SubTest.tstest"); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB If Convert.ToInt16(Me.GetExtractedValue("num")) Mod 2 = 0 Then Me.ExecuteTest("SubTest.tstest") End If - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/general/verify-not-empty.md b/docs-teststudiodev/code-in-test/coded-samples/general/verify-not-empty.md index eab3a5d7..8a85d1f6 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/general/verify-not-empty.md +++ b/docs-teststudiodev/code-in-test/coded-samples/general/verify-not-empty.md @@ -4,27 +4,21 @@ page_title: Verify Not Empty - Test Studio Dev Documentation description: Verify Not Empty position: 1 --- -#Verify Not Empty# +# Verify Not Empty *I would like to verify the text content of an element is not empty. In other words, that it contains one or more characters.* This is possible with a coded solution. The example below is against this W3Schools site. -#### __[C#]__ - - {{region }} - +````C# HtmlTable table = Find.ByTagIndex("table", 0); HtmlTableRow row = table.Rows[0]; HtmlTableCell cell = row.Cells[1]; Log.WriteLine(cell.TextContent); Assert.IsTrue(cell.TextContent.Length > 0); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB Dim table As HtmlTable = Find.ByTagIndex(Of HtmlTable)("table", 0) Dim row As HtmlTableRow = table.Rows(0) @@ -32,4 +26,4 @@ This is possible with a coded solution. The example below is against checkdomai
- - + +
![Before Test Run][1]

**Before Test Run**
![After Test Run][2]

**After Test Run**
Before Test Run

**Before Test Run**
After Test Run

**After Test Run**
The test needs to navigate to checkdomain.com, enter the domain for the respective iteration and click on Submit. Add a coded step and insert the below code: -#### __[C#]__ - - {{region }} - +````C# string dataSourcePath = this.ExecutionContext.DeploymentDirectory + @"\Data\domainResults.xlsx"; string myPath = "C:\\domainResults.xlsx"; @@ -60,11 +57,8 @@ The test needs to navigate to checkdomain.com, enter the domain for the respecti excelApp.Quit(); GC.Collect(); System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB Dim dataSourcePath As String = Me.ExecutionContext.DeploymentDirectory + "\Data\domainResults.xlsx" Dim myPath As String = "C:\domainResults.xlsx" @@ -96,9 +90,8 @@ The test needs to navigate to checkdomain.com, enter the domain for the respecti excelApp.Quit() GC.Collect() System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp) - {{endregion}} +```` **Note:** Add an Assembly Reference to Microsoft.Office.Interop.Excel. -[1]: images/write-into-data-source/fig1.png -[2]: images/write-into-data-source/fig2.png + diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/add-tag-to-iFrame.md b/docs-teststudiodev/code-in-test/coded-samples/html/add-tag-to-iFrame.md index 5160bbbc..a4b00c1a 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/add-tag-to-iFrame.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/add-tag-to-iFrame.md @@ -4,7 +4,7 @@ page_title: Add Tag to iFrame - Test Studio Dev Documentation description: Add Tag to iFrame position: 1 --- -# Add Tag to iFrame # +# Add Tag to iFrame To help Test Studio Dev locate your _iframes_, you can add a custom tag to the iframe. You can then add this tag to the frame properties in your test. There are two ways to add a tag to an iframe: @@ -12,50 +12,41 @@ To help Test Studio Dev locate your _iframes_, you can add a custom tag to the i * Add the tag dynamically in a coded step. -## Add a Tag to a iframe in HTML ## +## Add a Tag to a iframe in HTML To add a tag to a iframe in your application's HTML, add the 'testStudioTag' attribute to the frame element. For example: -```HTML +````HTML -``` +```` -## Add a Tag Dynamically in Code ## +## Add a Tag Dynamically in Code If it is not possible to add custom tags to your iframes, you can add them at runtime using a coded step. 1. Add the following using directive to your ode-behind file: -#### __[C#]__ - - {{region }} - - using ArtOfTest.WebAii.Design.Extensions; - {{endregion}} +````C# + using ArtOfTest.WebAii.Design.Extensions; +```` 2. Call the **myFrame()** method on the frame object in a coded step. For example: -#### __[C#]__ - - {{region }} - - [CodedStep(@"Tag Frame with 'MyCustomTag'")] - public void WebTest1_CodedStep() +````C# + [CodedStep(@"Tag Frame with 'MyCustomTag'")] + public void WebTest1_CodedStep() + { + Browser myFrame = this.ActiveBrowser.Frames[0] as Browser; + if (myFrame != null ) { - Browser myFrame = this.ActiveBrowser.Frames[0] as Browser; - if (myFrame != null ) - { - myFrame.TagFrame("MyCustomTag"); - } - } - {{endregion}} + myFrame.TagFrame("MyCustomTag"); + } + } +```` To tag a nested iframe, ensure the entire DOM is built, so that Test Studio Dev can access the iframes. For example: -#### __[C#]__ - - {{region }} - +````C# [CodedStep(@"Tag nested frame with 'MyCustomTag'")] public void WebTest1_CodedStep() { @@ -67,7 +58,7 @@ To tag a nested iframe, ensure the entire DOM is built, so that Test Studio Dev myFrame.TagFrame("MyCustomTag"); } } - {{endregion}} +```` __See also:__ diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/ajax-calendar-random-date.md b/docs-teststudiodev/code-in-test/coded-samples/html/ajax-calendar-random-date.md index fd3b018f..2e36b50f 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/ajax-calendar-random-date.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/ajax-calendar-random-date.md @@ -4,18 +4,15 @@ page_title: AJAX Calendar Random Date - Test Studio Dev Documentation description: AJAX Calendar Random Date position: 1 --- -#AJAX Calendar - Random Date Selection# +# AJAX Calendar - Random Date Selection *I would like to select a random date from an Ajax Calendar.* -##Solution## +## Solution The code below will show you how to select a random date from the Calendar on this site. -#### __[C#]__ - - {{region }} - +````C# //We scroll to the date picker so that we can see the click occurring. //Pages.WeekEndCourseullesSurMer.WeekendFormFormTag is a definition which Test Studio Dev automatically generated. Pages.WeekEndCourseullesSurMer.WeekendFormFormTag.ScrollToVisible(ScrollToVisibleType.ElementBottomAtWindowBottom); @@ -52,12 +49,8 @@ The code below will show you how to select a random date from the Calendar on wikipedia.org as an example. First we'll find and click the top bold English link. -![wikipedia][1] +![wikipedia](images/common-find-expressions/fig1.png) Here's the HTML code for that link: @@ -28,27 +28,21 @@ Here's the HTML code for that link: The anchor element has no direct TextContent, so we'll need to locate by a partial match on InnerText: -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ByExpression("InnerText=~English", "tagname=a"); Assert.IsNotNull(a); a.Click(); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB Dim a As HtmlAnchor = Find.ByExpression(Of HtmlAnchor)("InnerText=~English", "tagname=a") Assert.IsNotNull(a) a.Click() - {{endregion}} +```` If we locate by an exact match on TextContent, the bottom *English* link will found. -![english link][2] +![english link](images/common-find-expressions/fig2.png) Here's the HTML code for that link: @@ -58,71 +52,40 @@ Here's the HTML code for that link: Here's how to locate and click that link: -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ByExpression("TextContent=English", "tagname=a"); Assert.IsNotNull(a); a.Click(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim a As HtmlAnchor = Find.ByExpression(Of HtmlAnchor)("TextContent=English", "tagname=a") Assert.IsNotNull(a) a.Click() - {{endregion}} +```` The following attributes apply to both links, however Test Studio returns the first HtmlAnchor that matches. In this case, that's the top bold *English* link. -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ByExpression("tagname=a", "href=//en.wikipedia.org/"); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim a As HtmlAnchor = Find.ByExpression(Of HtmlAnchor)("tagname=a", "href=//en.wikipedia.org/") - {{endregion}} +```` You can find it by xpath: -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ByXPath("//*[@id=\"www-wikipedia-org\"]/div[5]/div/a[2]"); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim a As HtmlAnchor = Find.ByXPath(Of HtmlAnchor)("//*[@id=""www-wikipedia-org""]/div[5]/div/a[2]") - {{endregion}} +```` You can also data drive the find expression: -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ByExpression("tagname=a", "textcontent=" + Data["Col1"].ToString()); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim a As HtmlAnchor = Find.ByExpression(Of HtmlAnchor)("tagname=a", "textcontent=" + Data("Col1").ToString()) - {{endregion}} - -[1]: images/common-find-expressions/fig1.png -[2]: images/common-find-expressions/fig2.png +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/conditional-dialog-handling.md b/docs-teststudiodev/code-in-test/coded-samples/html/conditional-dialog-handling.md index 1c76fde7..9b6558a9 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/conditional-dialog-handling.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/conditional-dialog-handling.md @@ -4,18 +4,15 @@ page_title: Conditional Dialog Handling - Test Studio Dev Documentation description: Conditional Dialog Handling position: 1 --- -#Conditionally Handling Dialog# +# Conditionally Handling Dialog *I would like to conditionally handle a dialog. If it appears, I'd like to handle it normally. If it doesn't, I'd like to continue with test execution.* -##Solution## +## Solution This is possible with a coded solution. The action that potentially triggers the dialog must be included in the code. -#### __[C#]__ - - {{region }} - +````C# ActiveBrowser.NavigateTo("http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert"); //Create the dialog and add it to the monitor @@ -40,12 +37,8 @@ This is possible with a coded solution. The action that potentially triggers the Manager.DialogMonitor.RemoveDialog(ad); ActiveBrowser.NavigateTo("http://www.bing.com"); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ActiveBrowser.NavigateTo("http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert") @@ -65,5 +58,5 @@ This is possible with a coded solution. The action that potentially triggers the Manager.DialogMonitor.RemoveDialog(ad) ActiveBrowser.NavigateTo("http://www.bing.com") - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/dynamic-grid.md b/docs-teststudiodev/code-in-test/coded-samples/html/dynamic-grid.md index 435b430e..25659f08 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/dynamic-grid.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/dynamic-grid.md @@ -34,10 +34,7 @@ Going back to Test Studio Dev project, you will notice a new element has appeare Create a new coded step and add the following lines that go through each (visible) cell in the Grid: -#### __[C#]__ - - {{region }} - +````C# foreach (HtmlTableRow r in Pages.ClientSideRowSelection.ContentPlaceholder1RadGrid1Table.AllRows) { foreach(HtmlTableCell c in r.Cells) @@ -45,7 +42,7 @@ Create a new coded step and add the following lines that go through each (visibl Log.WriteLine("Cell found. TextContent:"+c.TextContent); } } - {{endregion}} +```` This is C# code, the VB code will follow the same logic only transcribed in the corresponding syntax. Make sure the coded step executes at a point in your test when the page contains the grid fully loaded in the currently active browser. @@ -57,10 +54,7 @@ Let's look at the grid in the below image. Let's imagine we want to get the row In this example we want to check a checkbox but this could be any kind of control. The code we will use doesn't take into account what the content of the actual cell is: we just click it. Once again we'll be using the definition of the grid that we've stored in the the elements repository. Here's the code: -#### __[C#]__ - - {{region }} - +````C# HtmlTableRow containerRow=null; //The variable that will store the row that contains the name cell and the checkbox cell foreach (HtmlTableRow r in Pages.ClientSideRowSelection.ContentPlaceholder1RadGrid1Table.AllRows) @@ -83,12 +77,9 @@ In this example we want to check a checkbox but this could be any kind of contro checkbox.ScrollToVisible(); checkbox.MouseClick(); - {{endregion}} +```` [1]: images/dynamic-grid/fig1.png [2]: images/dynamic-grid/fig2.png [3]: images/dynamic-grid/fig3.png [4]: images/dynamic-grid/fig4.png -[5]: images/dynamic-grid/fig5.png - - diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/extract-an-attribute.md b/docs-teststudiodev/code-in-test/coded-samples/html/extract-an-attribute.md index a81f5cfb..d4455aff 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/extract-an-attribute.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/extract-an-attribute.md @@ -4,46 +4,39 @@ page_title: Extract an Attribute - Test Studio Dev Documentation description: Extract an Attribute position: 1 --- -# Extract an Individual HTML Attribute # +# Extract an Individual HTML Attribute *I would like to extract an individual HTML attribute and use it later in the test.* -## Solution ## +## Solution This is possible with a coded solution. Note that if you're simply verifying the value for a specific attribute you could use an Advanced Verification. HTML elements are formatted the following way: -```HTML +````HTML content -``` +```` -```HTML +````HTML Go to Google -``` +```` Here's how to set the value of the *lang* attribute (*which is en*) to a string. That string is then set as an extracted value to use later in the test through data binding (either attached to an input value or a verification). -#### __[C#]__ - - {{region }} - +````C# HtmlAnchor a = Find.ById("googleLink"); Assert.IsNotNull(a); string atr = a.Attributes.Single(x => x.Name == "lang").Value; Log.WriteLine(atr); SetExtractedValue("extraction", atr); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim a As HtmlAnchor = Find.ById(Of HtmlAnchor)("googleLink") Assert.IsNotNull(a) Dim atr As String = a.Attributes.[Single](Function(x) x.Name = "lang").Value Log.WriteLine(atr) SetExtractedValue("extraction", atr) - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/html/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/html/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/html/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/fig4.png b/docs-teststudiodev/code-in-test/coded-samples/html/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/image-comparison.md b/docs-teststudiodev/code-in-test/coded-samples/html/image-comparison.md index 0ba25394..29fc9be9 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/image-comparison.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/image-comparison.md @@ -4,18 +4,15 @@ page_title: Image Comparison - Test Studio Dev Documentation description: Image Comparison position: 1 --- -# Perform an Image Comparison in Code # +# Perform an Image Comparison in Code *I would like to compare a specific image from the browser to one stored on disk.* -## Solution ## +## Solution Here is sample code showing how to perform the image comparison: -#### __[C#]__ - - {{region }} - +````C# HtmlImage img = Find.ById("myImageId"); System.Drawing.Bitmap actualbmp = img.Capture(); @@ -23,12 +20,8 @@ Here is sample code showing how to perform the image comparison: ArtOfTest.Common.PixelMap actual = ArtOfTest.Common.PixelMap.FromBitmap(actualbmp); Assert.IsTrue(expected.Compare(actual, 5.0)); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim img As HtmlImage = Find.ById(Of HtmlImage)("myImageId") Dim actualbmp As System.Drawing.Bitmap = img.Capture() @@ -36,6 +29,6 @@ Here is sample code showing how to perform the image comparison: Dim actual As ArtOfTest.Common.PixelMap = ArtOfTest.Common.PixelMap.FromBitmap(actualbmp) Assert.IsTrue(expected.Compare(actual, 5.0)) - {{endregion}} +```` In the above code I am getting the image of the "myImageId" element from the browser and comparing it to the expected image stored on disk named "myExpected.png". The comparison is allowing a 5% tolerance, meaning there may be up to a 5% difference in the image or else the Assert fails and the test aborts. diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/common-find-expressions/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/common-find-expressions/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/common-find-expressions/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/common-find-expressions/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig4.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/dynamic-grid/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig1.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig1.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig2.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig2.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig3.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig3.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig4.png b/docs-teststudiodev/code-in-test/coded-samples/html/images/jQuery-events-do-not-fire/fig4.png old mode 100644 new mode 100755 diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/jQuery-events-do-not-fire.md b/docs-teststudiodev/code-in-test/coded-samples/html/jQuery-events-do-not-fire.md index 8d7c003f..c34098fe 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/jQuery-events-do-not-fire.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/jQuery-events-do-not-fire.md @@ -12,25 +12,24 @@ Inputting text into - - - + + +
![Before Selection][1]

**Before Selection**
![Available Selections][2]

**Available Selections**
![After Selection][3]

**After Selection**
Before Selection

**Before Selection**
Available Selections

**Available Selections**
After Selection

**After Selection**
This is the HTML for the text input element: -```HTML +````HTML Enter your name: -``` +```` Invoke the script that changes the background color with the following coded step: -#### __[C#]__ - - {{region }} +````C# + Pages.TryitEditorV220.FrameIframeResult.Text.AsjQueryControl().InvokejQueryEvent(ArtOfTest.WebAii.jQuery.jQueryControl.jQueryControlEvents.change); - {{endregion}} +```` * The guideline is to always pair the two steps together. Immediately after performing the change step (input, radio button, etc.), run the coded step that calls the .change function for that element. @@ -38,6 +37,4 @@ Invoke the script that changes the background color with the following coded ste * If you have a choice between using id and name of an element, we recommend using id. It is usually a unique value which will make your tests run more reliably. Name is sometimes duplicated, which can cause your test to find and act against the wrong element, since the selector will act on the first element it finds matching the selector criteria. -[1]: images/jQuery-events-do-not-fire/fig1.png -[2]: images/jQuery-events-do-not-fire/fig2.png -[3]: images/jQuery-events-do-not-fire/fig3.png + diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/partial-attributes-search-fails.md b/docs-teststudiodev/code-in-test/coded-samples/html/partial-attributes-search-fails.md index cf20b66e..752afa0b 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/partial-attributes-search-fails.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/partial-attributes-search-fails.md @@ -4,42 +4,33 @@ page_title: Partial Attributes Search Fails - Test Studio Dev Documentation description: Partial Attributes Search Fails position: 1 --- -# Partial Attributes Search by Control Type Fails # +# Partial Attributes Search by Control Type Fails _A partial search of control by attribute may return null even with correct partial search syntax._ For example a HtmlInputButton search on the page having a complex ID containing some specific string should be located successfully using the following syntax: -#### __[C#]__ - - {{region }} - +````C# HtmlInputButton button = Find.ById("~MyButtonIDPart"); - {{endregion}} +```` Although the next example works as well: -#### __[C#]__ - - {{region }} - +````C# HtmlInputButton button = Find.ById("SomeButtonIDPart_MyButtonIDPart"); - {{endregion}} +```` -## Notes ## +## Notes The framework locates the first element matching the given attribute search criteria. Next, it compares the control type of the element and returns that element if the control type matches. If it does not, it simply returns null. In the first example, the framework returns null if there is another element that matches the given attribute search criteria and it is found before the target element. The control type does not match. -## Solution ## - -A simple solution is available. Use Find.AllByAttributes overload and return the first (and actually the only completely matching control): - -#### __[C#]__ +## Solution - {{region }} +A simple solution is available. Use `Find.AllByAttributes` overload and return the first (and actually the only completely matching control): +````C# HtmlInputButton button = Find.AllByAttributes("id=~MyButtonIDPart")[0]; - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/radwindow-width-height.md b/docs-teststudiodev/code-in-test/coded-samples/html/radwindow-width-height.md index 79af0fd0..43e25220 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/radwindow-width-height.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/radwindow-width-height.md @@ -4,20 +4,17 @@ page_title: RadWindow Width & Height - Test Studio Dev Documentation description: RadWindow Width & Height position: 1 --- -# Getting RadWindow Width and Height # +# Getting RadWindow Width and Height *I need to get the RadWindow width or height property.* -## Solution ## +## Solution First you need to get a reference to the RadWindow control by ID. Once you get it there are two options for getting the width/height. The first option is to use the relevant width/height properties of the RadWindow. The second is by invoking a straight JavaScript on the page. Here is the standard approach: -#### __[C#]__ - - {{region }} - +````C# Manager.LaunchNewBrowser(); ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx"); Find.ById("Button3").MouseClick(); @@ -27,12 +24,8 @@ Here is the standard approach: //First Option Assert.AreEqual(300, window.Width); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Manager.LaunchNewBrowser() ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx") Find.ById(Of HtmlInputSubmit)("Button3").MouseClick() @@ -41,14 +34,11 @@ Here is the standard approach: Dim window As RadWindow = Find.ById(Of RadWindow)("RadWindowWrapper_RadWindow_ContentTemplate") Assert.AreEqual(300, window.Width) - {{endregion}} +```` Invoking JavaScript on the page: -#### __[C#]__ - - {{region }} - +````C# Manager.LaunchNewBrowser(); ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx"); Find.ById("Button3").MouseClick(); @@ -59,11 +49,8 @@ Invoking JavaScript on the page: //Second Option string windowWidth = this.ActiveBrowser.Actions.InvokeScript(String.Format("$telerik.getBounds($find('RadWindow_ContentTemplate').get_popupElement()).width")); Assert.AreEqual("300", windowWidth); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB Manager.LaunchNewBrowser() ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx") @@ -74,6 +61,6 @@ Invoking JavaScript on the page: Dim windowWidth As String = Me.ActiveBrowser.Actions.InvokeScript([String].Format("$telerik.getBounds($find('RadWindow_ContentTemplate').get_popupElement()).width")) Assert.AreEqual("300", windowWidth) - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/table-searching-paging.md b/docs-teststudiodev/code-in-test/coded-samples/html/table-searching-paging.md index 32c1000e..1501f50d 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/table-searching-paging.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/table-searching-paging.md @@ -4,18 +4,15 @@ page_title: Table Searching & Paging - Test Studio Dev Documentation description: Table Searching & Paging position: 1 --- -#HTML Table Searching and Paging# +# HTML Table Searching and Paging *I would like to search an HTML table for specific content and continue through the pages until it is found.* -##Solution## +## Solution This is possible with a coded solution. The example below is against this Telerik demo site. -#### __[C#]__ - - {{region }} - +````C# HtmlTable table = Find.ByExpression("id=Grid", "|", "tagIndex=table:1"); HtmlSpan next = Find.ByExpression("class=k-icon k-i-arrow-e"); HtmlAnchor a = Find.ByExpression("title=Go to the next page"); @@ -54,12 +51,8 @@ This is possible with a coded solution. The example below is against this this W3Schools site. -#### __[C#]__ - - {{region }} - +````C# HtmlTable table = Find.ByTagIndex("table", 0); double r = table.Rows.Count; @@ -38,12 +35,8 @@ This is possible with a coded solution. The example below is against Dialog that is fired from the browser during test execution.* -##Solution## +## Solution This could be achieved in a coded solution. The code will both handle the dialog and verify the text within it. What is used to handle this in Chrome is **AutomationElement Class**. A new AutomationElement object is retrieved for the dialog window referenced by the specified window handle and its node is located. The location of the text may vary depending on the machine used for execution though this is handled in the if..else statement. @@ -21,10 +21,7 @@ This could be achieved in a coded solution. The code will both handle the dialog The last three could be usually found in *'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\'*. -#### __[C#]__ - - {{region }} - +````C# [CodedStep(@"New Coded Step")] public void WebTest_CodedStep() { @@ -54,12 +51,8 @@ The last three could be usually found in *'C:\Program Files (x86)\Reference Asse // handle the dialog Manager.Desktop.KeyBoard.KeyPress(Keys.Enter); } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB _ Public Sub WebTest_CodedStep() System.Threading.Thread.Sleep(1000) @@ -85,24 +78,17 @@ The last three could be usually found in *'C:\Program Files (x86)\Reference Asse ' handle the dialog Manager.Desktop.KeyBoard.KeyPress(Keys.Enter) End Sub - {{endregion}} +```` Ensure you add the following *using or Imports* statements to the top of the code-behind file: -#### __[C#]__ - - {{region }} - +````C# using System.Windows.Automation; using ArtOfTest.Common.Extensions; using System.Windows.Forms; - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports System.Windows.Automation Imports ArtOfTest.Common.Extensions Imports System.Windows.Forms - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/verify-dialog-text.md b/docs-teststudiodev/code-in-test/coded-samples/html/verify-dialog-text.md index a4473de9..180baa00 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/verify-dialog-text.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/verify-dialog-text.md @@ -4,18 +4,15 @@ page_title: Verify Dialog Text - Test Studio Dev Documentation description: Verify Dialog Text position: 1 --- -# How to Verify Dialog Text (Internet Explorer only) # +# How to Verify Dialog Text (Internet Explorer only) *I would like to verify the text of a Dialog that is fired from the browser during test execution.* -## Solution ## +## Solution This is possible with a coded solution. The code will both handle the dialog and verify the text within it. The second part uses a delegate to implement a custom handler for the dialog. -#### __[C#]__ - - {{region }} - +````C# string dialogText; [CodedStep(@"Navigate then verify text in popup dialog")] @@ -53,12 +50,8 @@ This is possible with a coded solution. The code will both handle the dialog an Manager.Desktop.KeyBoard.KeyPress(Keys.Enter); dialog.HandleCount++; } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Private dialogText As String _ @@ -90,22 +83,15 @@ This is possible with a coded solution. The code will both handle the dialog an Manager.Desktop.KeyBoard.KeyPress(Keys.Enter) dialog.HandleCount += 1 End Sub - {{endregion}} +```` Ensure you add the following *using* or *Imports* statements to the top of the code-behind file. -#### __[C#]__ - - {{region }} - +````C# using ArtOfTest.WebAii.Win32.Dialogs; using System.Windows.Forms; - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Imports ArtOfTest.WebAii.Win32.Dialogs Imports System.Windows.Forms - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/verify-sort-order-html.md b/docs-teststudiodev/code-in-test/coded-samples/html/verify-sort-order-html.md index 7dd7020c..c1ce9065 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/verify-sort-order-html.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/verify-sort-order-html.md @@ -4,20 +4,17 @@ page_title: Verify Sort Order - Test Studio Dev Documentation description: Verify Sort Order position: 1 --- -# Verify Sort Order in an HTML Table # +# Verify Sort Order in an HTML Table *I would like to sort a column in an HTML Table and verify the content is in the correct order.* -## Solution ## +## Solution This is possible with a coded solution. The example below is against this Telerik demo site. Let's verify the first column, Order ID, is in sequential order: -#### __[C#]__ - - {{region }} - +````C# //Get the table. HtmlTable table = Find.ByExpression("id=Grid", "|", "tagIndex=table:1"); @@ -45,12 +42,8 @@ Let's verify the first column, Order ID, is in sequential order: Assert.IsTrue(list[j+1].CompareTo(list[j]) >= 0); } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim table As HtmlTable = Find.ByExpression(Of HtmlTable)("id=Grid", "|", "tagIndex=table:1") Dim r As Integer = table.Rows.Count @@ -72,4 +65,4 @@ Let's verify the first column, Order ID, is in sequential order: Assert.IsTrue(list(j + 1).CompareTo(list(j)) >= 0) End If Next - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/html/verify-style.md b/docs-teststudiodev/code-in-test/coded-samples/html/verify-style.md index 11702230..fc8a1478 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/html/verify-style.md +++ b/docs-teststudiodev/code-in-test/coded-samples/html/verify-style.md @@ -4,20 +4,17 @@ page_title: Verify Style - Test Studio Dev Documentation description: Verify Style position: 1 --- -# Verify HTML Style # +# Verify HTML Style *I would like to verify an HTML element's style and extract it for use later in the test.* -## Solution ## +## Solution This is possible with a coded solution. Note that if you're simply verifying the style of an element you could use an Advanced Verification. The example below is against this W3Schools site. Two styles are verified, retrieved as strings, and set as extracted values to use later in the test through data binding (either attached to an input value or a verification). -#### __[C#]__ - - {{region }} - +````C# Browser frame = ActiveBrowser.Frames["view"]; HtmlControl paragraph = frame.Find.ByTagIndex("p", 0); Assert.IsNotNull(paragraph); @@ -32,12 +29,8 @@ The example below is against Silverlight demo site. After navigating there, click DataGrid in the left-hand menu. Then add a coded step: -#### __[C#]__ - - {{region }} - +````C# SilverlightApp app = ActiveBrowser.SilverlightApps()[0]; FindStrategy originalStrategy = app.Find.Strategy; @@ -44,12 +41,8 @@ The example below is against this Telerik demo site. -#### __[C#]__ - - {{region }} - +````C# public FrameworkElement FindElementByTextContent(string content) { int extentHeight; // The total height of the grid, visible plus non-visible @@ -79,12 +76,8 @@ The following code demonstrates how to accomplish this on a Telerik demo page. -#### __[C#]__ - - {{region }} +````C# + int verticalOffset = 0; // Holds the current vertical offset in the viewport int viewPortHeight; // The height of the visible part of the grid int extentHeight; // The total height of the grid, visible plus non-visible @@ -54,12 +53,10 @@ The following code demonstrates how to accomplish this against a Due to the volume of data contained in the sample RadGridView, this test will take hours to run through it all. But it shows all the necessary steps. diff --git a/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/total-rows-count.md b/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/total-rows-count.md index ea1b1acc..ade0b9e3 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/total-rows-count.md +++ b/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/total-rows-count.md @@ -4,20 +4,17 @@ page_title: Total Rows Count - Test Studio Dev Documentation description: Total Rows Count position: 1 --- -# RadGridView Total Rows Count # +# RadGridView Total Rows Count *I need to get the total number of rows contained in a RadGridView. The Rows.Count property of the RadGridView only returns the number of rows on the current page.* -## Solution # +## Solution The only way to get the total rows count is by calculating the number of rows per page and adding them to the running total. The following code demonstrates how to get the rows count of the RadGridView shown on this Telerik demo site. We use a Do/While loop in code which exits once the "Next Page" button is no longer Enabled. Then the row count is performed once more to account for the last page. -#### __[C#]__ - - {{region }} - +````C# int extentHeight; // The total height of the grid, visible plus non-visible int rowHeight; // The height of the row @@ -48,12 +45,8 @@ The following code demonstrates how to get the rows count of the RadGridView sho // Show the result Log.WriteLine("Total Number of Rows: "+ totalOverallRows.ToString()); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim extentHeight As Integer Dim rowHeight As Integer @@ -83,4 +76,4 @@ The following code demonstrates how to get the rows count of the RadGridView sho Log.WriteLine("Total Number of Rows: " + totalOverallRows.ToString()) - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/verify-specific-column.md b/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/verify-specific-column.md index 91847036..bd19b874 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/verify-specific-column.md +++ b/docs-teststudiodev/code-in-test/coded-samples/silverlight/radgridview-automation/verify-specific-column.md @@ -4,18 +4,15 @@ page_title: Verify Specific Column - Test Studio Dev Documentation description: Verify Specific Column position: 1 --- -# RadGridView Verify Data in a Specific Column # +# RadGridView Verify Data in a Specific Column *I need to find the correct column of a GridView based on something other than index, such as text content or a data driven variable.* -## Solution ## +## Solution Here is how to accomplish this against a Telerik demo site. First you need to retrieve all the Header Row Cells from the Grid and iterate through each one looking for a specific string. Each time it isn't found, the integer idx is increased by one. Once a match is made, idx will equal the index of the target column. Then you can use that integer to identify the column later: -#### __[C#]__ - - {{region }} - +````C# int verticalOffset = 0; // Holds the current vertical offset in the viewport int viewPortHeight; // The height of the visible part of the grid int extentHeight; // The total height of the grid, visible plus non-visible @@ -59,12 +56,8 @@ Here is how to accomplish this against a @@ -88,14 +88,11 @@ My sample Silverlight application to test contains this XAML code to render my l -``` +```` To help make the code necessary to accomplish our search task more modular, let's define a function that takes a listbox, a string to search for and finds and returns the listbox item want. Here is that function: -#### __[C#]__ - - {{region }} - +````C# private static ListBoxItem FindListboxItemByText (string itemToFind, ListBox myLB) { @@ -130,15 +127,12 @@ To help make the code necessary to accomplish our search task more modular, let' // We scanned the entire list and didn't find the right item to select. return null; } - {{endregion}} +```` We call this resusable function from a coded step like this: -#### __[C#]__ - - {{region }} - +````C# [CodedStep("Select a listbox item by text")] public void SelectListItemByTextCodedStep() { @@ -151,4 +145,4 @@ We call this resusable function from a coded step like this: Assert.IsNotNull(item, "\"" + itemToFind + "\" not found in the listbox."); item.User.Click(); } - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-colors-in-silverlight.md b/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-colors-in-silverlight.md index 17db3151..c5640eb8 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-colors-in-silverlight.md +++ b/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-colors-in-silverlight.md @@ -2,20 +2,17 @@ title: Verify Colors in Silverlight page_title: Verify Colors in Silverlight - Test Studio Dev Documentation description: Verify Colors in Silverlight -position: 1 +position: 2 --- -# Verify Colors in Silverlight # +# Verify Colors in Silverlight _I would like to add a color verification for an element in a Silverlight application._ -## Solution ## +## Solution The code below demonstrates this approach against this Telerik demo site. It gets the first item in the menu and verifies that its foreground color matches pre-defined values: -#### __[C#]__ - - {{region }} - +````C# Manager.Settings.Web.EnableSilverlight = true; Manager.LaunchNewBrowser(); ActiveBrowser.NavigateTo("http://demos.telerik.com/silverlight/#TreeView/Performance"); @@ -47,11 +44,8 @@ The code below demonstrates this approach against this a Silverlight toolkit sample. After navigating there, click DataGrid in the left-hand menu. Then click the **FirstName** column header to sort that column. Finally, add a coded step: -#### __[C#]__ - - {{region }} - +````C# //Get the data grid. SilverlightApp app = ActiveBrowser.SilverlightApps()[0]; DataGrid grid = app.Find.ByAutomationId("dataGrid"); @@ -46,12 +43,8 @@ After navigating there, click DataGrid in the left-hand menu. Then click the **F Assert.IsTrue(list[j+1].CompareTo(list[j]) >= 0); } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim app As SilverlightApp = ActiveBrowser.SilverlightApps()(0) Dim grid As DataGrid = app.Find.ByAutomationId(Of DataGrid)("dataGrid") @@ -74,6 +67,6 @@ After navigating there, click DataGrid in the left-hand menu. Then click the **F Assert.IsTrue(list(j + 1).CompareTo(list(j)) >= 0) End If Next - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-text-in-rich-textbox.md b/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-text-in-rich-textbox.md index 7a5d0182..0e7aea11 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-text-in-rich-textbox.md +++ b/docs-teststudiodev/code-in-test/coded-samples/silverlight/verify-text-in-rich-textbox.md @@ -2,25 +2,25 @@ title: Verify Text in Rich TextBox page_title: Verify Text in Rich TextBox - Test Studio Dev Documentation description: Verify Text in Rich TextBox -position: 1 +position: 2 --- -# Verify Text in a Silverlight RichTextBox # +# Verify Text in a Silverlight RichTextBox _I cannot verify all the text or its properties in my Silverlight RichTextBox. The contents are either not visible or each word is contained in an individual TextBlock in the Visual Tree._ -## Solution ## +## Solution The Silverlight RichTextBox is tricky to work with. It is a "container" type of control, meaning it contains other "block" elements, usually the Paragraph or Section. It is these block elements that hold the actual text displayed in the RichTextBox. Thus, to fetch the displayed text, you must enumerate through the individual blocks and fetch the text from each block element. To make matters worse, the contents of the RichTextBox may not be contained in the Silverlight Visual Tree. You have to get the Xaml property and parse the contents yourself. Here is an example. Let's assume that you have this in the XAML file for your Silverlight application: -```XAML +````XML -``` +```` The application will show text as shown below. @@ -28,7 +28,7 @@ The application will show text as shown below. However in DOM Explorer all you see is this: -```XAML +````XML @@ -52,14 +52,13 @@ However in DOM Explorer all you see is this: -``` +```` Notice that there's no text in the DOM view, even though it is specified in the XAML and displayed in the application. We have to use code to fetch the XAML that the RichTextBox holds as data, then parse out the text buried in it. Here's an example: -#### __[C#]__ - - {{region }} +````C# + // Fetch the XAML property of the RichTextBox string rtbContents = (string)Pages.SilverlightAppTesting.SilverlightApp.RichTextBox1Richtextbox.GetProperty(new AutomationProperty("Xaml", typeof(string))); @@ -75,12 +74,10 @@ Notice that there's no text in the DOM view, even though it is specified in the { Log.WriteLine(runNode.Attributes["Text"].Value); } - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + Dim rtbContents As String = DirectCast(Pages.SilverlightAppTesting.SilverlightApp.RichTextBox1Richtextbox.GetProperty(New AutomationProperty("Xaml", GetType(String))), String) Dim doc As XmlDocument = New System.Xml.XmlDocument() @@ -91,14 +88,13 @@ Notice that there's no text in the DOM view, even though it is specified in the For Each runNode As XmlNode In runNodes Log.WriteLine(runNode.Attributes("Text").Value) Next - {{endregion}} +```` Here's how to verify the text is bold: -#### __[C#]__ - - {{region }} +````C# + string rtbContents = (string)Pages.SilverlightAppTesting.SilverlightApp.RichTextBox1Richtextbox.GetProperty(new AutomationProperty("Xaml", typeof(string))); Log.WriteLine(rtbContents); @@ -114,12 +110,10 @@ Here's how to verify the text is bold: // Verify it is Bold Assert.AreEqual("Bold", attr.Value); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + Dim rtbContents As String = DirectCast(Pages.SilverlightAppTesting.SilverlightApp.RichTextBox1Richtextbox.GetProperty(New AutomationProperty("Xaml", GetType(String))), String) Log.WriteLine(rtbContents) @@ -135,6 +129,6 @@ Here's how to verify the text is bold: Assert.AreEqual(Of String)("Bold", attr.Value) - {{endregion}} +```` [1]: images/verify-text-in-rich-textbox/fig1.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/wpf/automate-clickonce-app.md b/docs-teststudiodev/code-in-test/coded-samples/wpf/automate-clickonce-app.md index eb0a5235..6cc475dd 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/wpf/automate-clickonce-app.md +++ b/docs-teststudiodev/code-in-test/coded-samples/wpf/automate-clickonce-app.md @@ -14,33 +14,23 @@ To automate a WPF application it is necessary to p.ProcessName == "WPFHelloWorld"); @@ -31,12 +28,8 @@ To work around this limitation, create a mock application to feed to Test Studio } Manager.ActiveApplication.MainWindow.RefreshVisualTrees(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ActiveApplication.Quit() Dim runningApp = System.Diagnostics.Process.GetProcesses().Where(Function(p) p.ProcessName = "WPFHelloWorld") @@ -47,4 +40,4 @@ To work around this limitation, create a mock application to feed to Test Studio End If Manager.ActiveApplication.MainWindow.RefreshVisualTrees() - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-grid-cells.md b/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-grid-cells.md index 1fb84917..82b1701b 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-grid-cells.md +++ b/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-grid-cells.md @@ -4,18 +4,15 @@ page_title: Go Through Grid Cells - Test Studio Dev Documentation description: Connect to Running App position: 4 --- -# Go Through Each Cell in a WPF RadGridView # +# Go Through Each Cell in a WPF RadGridView *I would like to go through each cell in a WPF RadGridView and perform some action or verification.* -##Solution## +## Solution This is possible with a coded solution. Here's an example that goes through all the visible cells in a WPF demo grid (as opposed to all the cells contained in the grid). It writes the text content of each cell into the test log. -#### __[C#]__ - - {{region }} - +````C# WpfApplication app = Manager.ActiveApplication; Assert.IsNotNull(app); @@ -36,12 +33,8 @@ This is possible with a coded solution. Here's an example that goes through all } rowCounter++; } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim app As WpfApplication = Manager.ActiveApplication Assert.IsNotNull(app) @@ -60,7 +53,7 @@ This is possible with a coded solution. Here's an example that goes through all Next rowCounter += 1 Next - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-radtreeview.md b/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-radtreeview.md index 34806d22..99e79797 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-radtreeview.md +++ b/docs-teststudiodev/code-in-test/coded-samples/wpf/go-through-radtreeview.md @@ -4,18 +4,15 @@ page_title: Go Through RadTreeView - Test Studio Dev Documentation description: Go Through RadTreeView position: 3 --- -# Go Through Each Node in a WPF RadTreeView # +# Go Through Each Node in a WPF RadTreeView *I would like to go through each node in a WPF RadTreeView until a match is made.* -## Solution ## +## Solution This is possible with a coded solution. You'll expand each node and refresh the tree until you find your match. -#### __[C#]__ - - {{region }} - +````C# WpfApplication app = Manager.ActiveApplication; Assert.IsNotNull(app); Telerik.WebAii.Controls.Xaml.Wpf.RadTreeView tree = app.MainWindow.Find.ByName("treeView"); @@ -55,12 +52,8 @@ This is possible with a coded solution. You'll expand each node and refresh the break; } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim app As WpfApplication = Manager.ActiveApplication Assert.IsNotNull(app) Dim tree As Telerik.WebAii.Controls.Xaml.Wpf.RadTreeView = app.MainWindow.Find.ByName(Of Telerik.WebAii.Controls.Xaml.Wpf.RadTreeView)("treeView") @@ -92,6 +85,6 @@ This is possible with a coded solution. You'll expand each node and refresh the Exit While End If End While - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/coded-samples/wpf/parameterize-wpf-app.md b/docs-teststudiodev/code-in-test/coded-samples/wpf/parameterize-wpf-app.md index aca91549..d7c214f0 100644 --- a/docs-teststudiodev/code-in-test/coded-samples/wpf/parameterize-wpf-app.md +++ b/docs-teststudiodev/code-in-test/coded-samples/wpf/parameterize-wpf-app.md @@ -4,13 +4,13 @@ page_title: Parameterize WPF App - Test Studio Dev Documentation description: Parameterize WPF App position: 2 --- -# Parameterize the Location of a WPF Application # +# Parameterize the Location of a WPF Application Currently Test Studio Dev is rigged that you cannot run a WPF Test unless you provide a definite (non-parameterized) location for the application under testing. ![Configure WPF path][1] -## Solution ## +## Solution To work around this limitation, create a mock application to feed to Test Studio Dev. Then change the application under testing in a coded step. This allows you to use a parameterization method of your choosing for the app's location. @@ -24,10 +24,7 @@ To work around this limitation, create a mock application to feed to Test Studio Let's assume that the "real" application is in the following location: **C:\myapps\Go.exe**. Here's the code: -#### __[C#]__ - - {{region }} - +````C# //Shut down "mock" app ActiveApplication.Quit(); @@ -45,12 +42,8 @@ Let's assume that the "real" application is in the following location: **C:\myap //Check whether we connected successfully Assert.IsNotNull(app); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ActiveApplication.Quit() @@ -64,15 +57,12 @@ Let's assume that the "real" application is in the following location: **C:\myap Assert.IsNotNull(app) - {{endregion}} +```` You can extend this code to include parameterization for the app's location. You can use data binding, for instance. Let's say your test is bound to a data sheet with a column named "paths": -#### __[C#]__ - - {{region }} - +````C# var pinfo = new System.Diagnostics.ProcessStartInfo(Data["paths"]); - {{endregion}} +```` [1]: images/parameterize-wpf-app/fig1.png diff --git a/docs-teststudiodev/code-in-test/element-identification/dom-navigation.md b/docs-teststudiodev/code-in-test/element-identification/dom-navigation.md index 3dc8807a..92eb1f9d 100644 --- a/docs-teststudiodev/code-in-test/element-identification/dom-navigation.md +++ b/docs-teststudiodev/code-in-test/element-identification/dom-navigation.md @@ -4,7 +4,7 @@ page_title: DOM Navigation - Test Studio Dev Documentation description: DOM Navigation position: 1 --- -#DOM Navigation# +# DOM Navigation Once you have an element, you can navigate to other elements relative to this element. Navigation methods include: @@ -20,7 +20,7 @@ Once you have an element, you can navigate to other elements relative to this el Suppose we have some HTML that looks like this: -```HTML +````HTML
DIV1 TEXT
@@ -30,13 +30,10 @@ Suppose we have some HTML that looks like this: SPAN3 TEXT
-``` +```` Here is how we can navigate around the DOM once we have a starting element: -#### __[C#]__ - - {{region }} - +````C# // Let's start with the span1 element. Element span1 = Find.ById("span1"); Element span2 = span1.GetNextSibling(); @@ -67,12 +64,8 @@ Here is how we can navigate around the DOM once we have a starting element: Assert.IsTrue(span1.IdAttributeValue.Equals("span1"), string.Format("Actual ID: {0}", span1.IdAttributeValue)); Assert.IsTrue(span2.IdAttributeValue.Equals("span2"), string.Format("Actual ID: {0}", span2.IdAttributeValue)); Assert.IsTrue(span3.IdAttributeValue.Equals("span3"), string.Format("Actual ID: {0}", span3.IdAttributeValue)); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB ' Let's start with the span1 element. Dim span1 As Element = Find.ById("span1") Dim span2 As Element = span1.GetNextSibling() @@ -103,4 +96,4 @@ Here is how we can navigate around the DOM once we have a starting element: Assert.IsTrue(span1.IdAttributeValue.Equals("span1"), String.Format("Actual ID: {0}", span1.IdAttributeValue)) Assert.IsTrue(span2.IdAttributeValue.Equals("span2"), String.Format("Actual ID: {0}", span2.IdAttributeValue)) Assert.IsTrue(span3.IdAttributeValue.Equals("span3"), String.Format("Actual ID: {0}", span3.IdAttributeValue)) - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/element-identification/find-expressions.md b/docs-teststudiodev/code-in-test/element-identification/find-expressions.md index e6216b72..6e156282 100644 --- a/docs-teststudiodev/code-in-test/element-identification/find-expressions.md +++ b/docs-teststudiodev/code-in-test/element-identification/find-expressions.md @@ -4,7 +4,7 @@ page_title: Find Expressions - Test Studio Dev Documentation description: Find Expressions position: 1 --- -#HTML and XAML Find Expressions# +# HTML and XAML Find Expressions FindExpression's are the replacement/evolution of FindParam's. We will be using FindExpression's as the base for all element searches in the DOM, HWnd, or control trees (including Translator Locators). The key design goal for FindExpressions is to enable a flexible, rich and extensible search definition pattern that can be used across all of our Telerik technologies. This will enable our customers to carry over their product experience as they move across our product stacks making the learning curve for customers moving from one technology to another minimal.ma @@ -32,28 +32,28 @@ FindExpression's are the following: 6.Can't easily be leveraged for searches within other technologies. -##Basic Concept## +## Basic Concept The key to understanding FindExpression's is to understand its basic component: the FindClause. A FindClause is a name/value pair with an optional comparison operator. A FindExpression consists of 1-n FindClauses. For example: -###FindClauses Without Operators### +### FindClauses Without Operators -``` +```` TagName=div id=bar innermarkup=hellothere -``` +```` -###FindClauses With Operators### +### FindClauses With Operators -``` +```` name=~bar [name attribute partially contains bar] automationid=^hat [the automation id of an element starts with hat] -``` +```` **Note:** The optional operator is ALWAYS the first character after the = in the expression. This special character can be escaped with a preceding ' character if it is meant to be interpreted as a literal character. -###Supported Operators### +### Supported Operators
@@ -108,17 +108,17 @@ automationid=^hat [the automation id of an element starts with hat] The name portion of the clause can be a well known enumeration that a certain technology (i.e. HTML, XAML) recognizes as a certain search pattern. For example, in HTML: -``` +```` xpath=HTML[0]/div[1] -``` +```` is interpreted by the HTML search tree as a specific search that requires XPATH interpretation. -``` +```` automationid=?sam -``` +```` -##Constructing FindExpressions## +## Constructing FindExpressions Each technology (HTML, Silverlight, etc.) will define its own FindExpression that inherits from the base FindExpression object. All FindExpression's need only one constructor to define any type of search. @@ -126,16 +126,13 @@ For example: Find the HTML element with an id that ends with 'sam' and also has a class attribute that contains bar and also has a text content that does not contain foo. -#### __[C#]__ - - {{region }} - +````C# HtmlFindExpression expr = new HtmlFindExpression("id=bar","|","tagindex=td:0","|","tagname=img","src=~png"); - {{endregion}} +```` -##Hierarchy Constraint## +## Hierarchy Constraint -You can also describe a certain hierarchal constraint to be applied against that FindExpression so that the decision on whether a specific element matches a specific translator or not is not solely based on the tag but also takes into consideration its hierarchical position. For example a tag that looks like
might be part of a grid while at the same time other elements on the page could contain that tag. The only way to distinguish whether that tag is part of the grid is to inspect its parent or child hierarchy. +You can also describe a certain hierarchal constraint to be applied against that FindExpression so that the decision on whether a specific element matches a specific translator or not is not solely based on the tag but also takes into consideration its hierarchical position. For example a tag that looks like `
` might be part of a grid while at the same time other elements on the page could contain that tag. The only way to distinguish whether that tag is part of the grid is to inspect its parent or child hierarchy. FindExpression's natively support hierarchy constraints. A FindExpression can have 0-n HierarchyConstraint objects associated with it. @@ -147,19 +144,18 @@ A hierarchy constraint contains two pieces of data: For example, suppose we have the following HTML code snippet to deal with: -```HTML +````HTML
-``` +```` Now we want to match the div tag that has class='bar' and its parent's parent has an id='foo1': -#### __[C#]__ - - {{region }} +````C# + // This expression will locate both p tags at [0] & [3] HtmlFindExpression expression = new HtmlFindExpression("class=bar", "tagname=div"); @@ -170,12 +166,10 @@ Now we want to match the div tag that has class='bar' and its parent's parent ha // -2 signifies two parents up. // Note that HierarchyConstraints are [1] based. Zero signifies the target element or reference point. expression.AddHierarchyConstraint(new HierarchyConstraint(parentExpr, -2)); - {{endregion}} - -#### __[VB]__ - - {{region }} +```` +````VB + ' This expression will locate both p tags at [0] & [3] Dim expression As New HtmlFindExpression("class=bar", "tagname=div") @@ -186,13 +180,13 @@ Now we want to match the div tag that has class='bar' and its parent's parent ha ' -2 signifies two parents up. ' Note that HierarchyConstraints are [1] based. Zero signifies the target element or reference point. expression.AddHierarchyConstraint(New HierarchyConstraint(parentExpr, -2)) - {{endregion}} +```` The resulting expression now will match [3] ONLY. Here is a more involved scenario: -```HTML +````HTML

@@ -204,13 +198,13 @@ Here is a more involved scenario:

-``` +```` If we wish the constraint to match the first child of the parent's parent (i.e. [2]) and to be an 'span' instead, that is also doable. The path in that case is -2, 1 => Two parents up, one down at index 1. (Or -1, -1, 1, both are the same) and the second FindExpression will be "TagName=span" instead of "id=foo1". -##HtmlFindExpression Types## +## HtmlFindExpression Types The following is a list of the types that can appear on the left side of the expression in HtmlFindExpressions: @@ -234,7 +228,7 @@ The following is a list of the types that can appear on the left side of the exp * XPath - search for an element at the specified XPath expression. -##XamlFindExpression Types## +## XamlFindExpression Types The following is a list of the types that can appear on the left side of the expression in XamlFindExpressions: diff --git a/docs-teststudiodev/code-in-test/element-identification/find-param-as-xml-data.md b/docs-teststudiodev/code-in-test/element-identification/find-param-as-xml-data.md index 9fffa750..9c3ad0f3 100644 --- a/docs-teststudiodev/code-in-test/element-identification/find-param-as-xml-data.md +++ b/docs-teststudiodev/code-in-test/element-identification/find-param-as-xml-data.md @@ -4,7 +4,7 @@ page_title: FindParam as XML Data - Test Studio Dev Documentation description: FindParam as XML Data position: 1 --- -#FindParams as External XML Data Sources# +# FindParams as External XML Data Sources **Note:** This topics assumes a basic understanding of FindParam objects. It is recommended to read the
Finding Page Elements topic first before reading this topic. @@ -18,14 +18,12 @@ By doing so we can: * Enable the same test logic/code to run against different versions of the same application that differ in UI layout or DOM structure. By versioning the external data sources per each different application version, we can configure our tests to consume different data source versions for each application being tested without having to duplicate test code and worry about maintaining multiple code bases. This approach can dramatically cut down maintenance and support costs especially for product teams that maintain and service multiple versions of the same application. It is also a great approach to take on if you are starting a new project and you think you will end up having to support multiple versions of that product in the future. -##Building FindParam Data Sources## +## Building FindParam Data Sources We currently don't offer any UI design tools that can help build these data sources directly from your application. Therefore, to build these data source we need to craft our FindParams manually and then using FindParam and FindParamCollection XML serialization methods, store the generated sources to our storage medium of choice (i.e. database, file system ...etc). The sample below shows an example of how to build an XML file that can be later consumed by your test code to identify elements to use in the automation logic. -#### __[C#]__ - - {{region }} +````C# // First we build the list of FindParam objects we want serialized // and add them to a FindParamCollection object. @@ -48,16 +46,13 @@ The sample below shows an example of how to build an XML file that can be later // in your choice of storage medium. // // string serializedParams = paramCol.ToXml(); - {{endregion}} +```` -##Consuming the Data Sources## +## Consuming the Data Sources The are three different methods you can use to consume the data source generated above. We can deserialize the data back into a FindParamCollection object and then select one of these FindParams to locate a specific element on the page. -#### __[C#]__ - - {{region }} - +````C# // Given we already have a datasource of FindParam's stored on a different medium, // we can deserialize the data back into a FindParamCollection object and then // select one of these FindParam's to locate a specific element on the page @@ -69,14 +64,11 @@ The are three different methods you can use to consume the data source generated // Perform your automation actions on the element. ActiveBrowser.Actions.SetText(inputText, "sometext"); - {{endregion}} +```` Alternatively we can can create a Dictionary lookup object from the external datasource. -#### __[C#]__ - - {{region }} - +````C# // FindParams can be completely extracted out of test code and stored in an external xml file. // // This allows you to: @@ -101,14 +93,11 @@ Alternatively we can can create a Dictionary lookup object from the external dat // Note: // 1. If you have the XML string stored in a DataBase, you can use the Find.FromXml() // to find these elements directly from the string. - {{endregion}} +```` Finally we can load the external datasource using a FindParamAttribute. -#### __[C#]__ - - {{region }} - +````C# // The SupportFiles\FindElementsFromFile.xml shows a sample xml file with two FindParams defined; one for // the MainTable and the other for ProgramsTable. @@ -120,9 +109,9 @@ Finally we can load the external datasource using a FindParamAttribute. Assert.IsTrue(Find.Elements.Count == 2); Assert.IsTrue(Find.Elements["MainTable"].ElementType == ElementType.Table); Assert.IsTrue(Find.Elements["ProgramsTable"].ElementType == ElementType.Table); - {{endregion}} +```` -##Managing and Organizing Data Sources for an Entire Application## +## Managing and Organizing Data Sources for an Entire Application There are probably many ways you can think of to organize your external data sources for your an entire application. We though want to discuss three approaches you might want to consider. You can organize your external sources: diff --git a/docs-teststudiodev/code-in-test/element-identification/find-param-objects.md b/docs-teststudiodev/code-in-test/element-identification/find-param-objects.md index ec5a6454..fe3f01c2 100644 --- a/docs-teststudiodev/code-in-test/element-identification/find-param-objects.md +++ b/docs-teststudiodev/code-in-test/element-identification/find-param-objects.md @@ -4,27 +4,21 @@ page_title: FindParam Objects - Test Studio Dev Documentation description: FindParam Objects position: 1 --- -#FindParam Objects# +# FindParam Objects All the identification methods exposed by the 'Find' object described above use FindParam objects under the covers to describe the desired element within the DOM tree to Telerik's identification engine. The engine itself can only understand searches using FindParam's. You can directly invoke element searches against the identification engine using the Find.ByParam() or Find.AllByParam() methods. When FindParam's are used directly to define a search, they enable a richer, consistent and more flexible way to describe a certain element than just the Find.Byxx() which were designed to cater for the most common scenarios. For example, if you want to describe the second 'div' on a page with class=myclass. You can't directly do that using the Find.Byxx() methods unless you first find the second 'div' element then inspect its attributes to figure out if the class attribute is set 'myclass'. With FindParam objects, you can simply describe that search by: -#### __[C#]__ - - {{region }} - +````C# // The find object will only return an element if all conditions // exist. Else NULL. Element e = Find.ByParam(new FindParam("div", 1,"class=myclass")); Assert.IsNotNull(e); - {{endregion}} +```` Here are some other examples: -#### __[C#]__ - - {{region }} - +````C# Element e; // Find.ById() is implemented as @@ -42,9 +36,9 @@ Here are some other examples: p.ContentType = FindContentType.InnerMarkup; e = Find.ByParam(p); Assert.IsNotNull(e); - {{endregion}} +```` -##Chained Identification## +## Chained Identification Chained identification is simply using multiple FindParam objects (as in a chain) to identify an element. Chained identification is used to help simplify locating nested and complex markup elements and promote a more robust approach for element identification in these scenarios. @@ -54,7 +48,7 @@ To help understand chained identification better, let's take a concrete example. Many times developers find themselves struggling with a markup nesting similar to the one below; particularly on rich content websites when heavy styling is applied or when using dynamic web development technologies like ASP.NET. In the sample below, the outer table contains an id attribute but the rest of the nested tables don't. Let's assume a test needs to access the inner most table to verify its content. Instead of looking up the overall 'table' occurrence index over an entire document which can easily become difficult on large complex pages, we would like to first identify the "table1" element by its id and then simply count two table occurrences from it (occurrence index 1) to locate the inner table. -```HTML +````HTML
@@ -80,15 +74,12 @@ Many times developers find themselves struggling with a markup nesting similar t
-``` +```` Below is the chained identification code to accomplish that. -#### __[C#]__ - - {{region }} - +````C# // Generic chained identification FindParam idtable1 = new FindParam("id=table1"); @@ -99,8 +90,8 @@ Below is the chained identification code to accomplish that. Element innerTable = Find.ByParam(new FindParam[] { idtable1, innertable }); Assert.IsNotNull(innertable); Assert.AreEqual(3, innerTable.Children[0].Children.Count); - {{endregion}} +```` -##Defining FindParam Objects Outside Test Code (i.e. FindParam Serialization)## +## Defining FindParam Objects Outside Test Code (i.e. FindParam Serialization) FindParam objects support serialization including the FindParamCollection. This support allows you to define your FindParam's outside your test code and consume them as data sources. This enables you to be more agile when changes are made to your application by simply updating the xml that defines your FindParam objects. This topic is covered in more detail under FindParams as External Xml DataSources. diff --git a/docs-teststudiodev/code-in-test/element-identification/finding-page-elements.md b/docs-teststudiodev/code-in-test/element-identification/finding-page-elements.md index 1d838545..aaeaa7fc 100644 --- a/docs-teststudiodev/code-in-test/element-identification/finding-page-elements.md +++ b/docs-teststudiodev/code-in-test/element-identification/finding-page-elements.md @@ -5,33 +5,7 @@ description: "Test Studio Find methods. Progress Testing Framework Find.By metho position: 1 --- - - -# Finding Page Elements # +# Finding Page Elements Telerik Testing Framework provides one of the richest markup identification infrastructures currently available on the market. It builds on top of commonly known element identification methods like 'getElementById', 'getElementByName' or 'XPath' and extends them to provide identification routines that cater more to application automation scenarios. In addition to maintaining a simple and easy to use set of APIs, Telerik Testing Framework introduces a consistent and extensible way to build identification and persist it using 'FindParam' objects. @@ -39,7 +13,7 @@ All the Find.Byxxx methods now support LINQ queries. It is important to understand how Telerik's identification method works because that understanding will allow you to exploit the power of these identification methods to build robust automation quicker. -##Element Identification Overview## +## Element Identification Overview The following identification methods are supported: @@ -48,56 +22,61 @@ The following identification methods are supported: MethodsDescriptionExample - **Find.ById()** + Find.ById() Searches for an element contained in a markup document using its set 'id' attribute. When the desired 'id' matches an element's id, the element is returned - identical to getElementById -``` + +```` // Find element with id=input1 Element e = Find.ById("input1"); -``` +```` - **Find.ByName()** + Find.ByName() Searches for an element contained in a markup document using its set 'name' attribute. When the desired 'name' matches an element's name, the element is returned -``` + +```` // Find element with name=goButton Element e = Find.ByName("goButton") -``` +```` - **Find.ByImage()**
- **Find.AllByImage()** + Find.ByImage()
+ Find.AllByImage() Searches for an element or 'All' elements that look like a predefined image -``` + +```` // Specify the predefined image on which the search will be based System.Drawing.Image img1 = System.Drawing.Image.FromFile(@"C:\sampleImg.png"); // Find an element that looks like the predefind image var elementImg1 = Manager.ActiveBrowser.Find.ByImage(img1, 70); // the second argument is the threshold % to use, while searching for the image // Cast the found element to be able to use it. The type of located element needs to be specified. HtmlButton btn1 = elementImg1.As(); -``` +```` - **Find.ByTagIndex()** + Find.ByTagIndex() Searches for an element using its tag name occurrence index. Finds the element at the specified occurrence index and returns it. This method uses zero based indexing. -``` + +```` // Find the 3rd occurrence of table tag Element table = Find.ByTagIndex("table", 2); -``` +```` - **Find.ByAttributes()**
- **Find.AllByAttributes()** + Find.ByAttributes()
+ Find.AllByAttributes() Searches for an element or 'All' elements using an 'exact' or 'partial' list of attribute values (You can specify 1-N attribute/value pairs). When all attribute values match, the element or collection of elements is returned. -``` + +```` // Find the first element with attribute class=myclass Element e = Find.ByAttributes("class=myclass"); // Find the first element with attribute class=myclass @@ -105,15 +84,16 @@ Element e = Find.ByAttributes("class=myclass"); Element e = Find.ByAttributes("class=myclass", "src=~foo.gif"); // Find all elements with class=myclass and src has a partial foo.gif IList allbtns = Find.AllByAttributes("class=myclass", "src=~foo.gif"); -``` +```` - **Find.ByContent()**
- **Find.AllByContent()** + Find.ByContent()
+ Find.AllByContent() Searches for an element or 'All' elements using 'exact', 'partial' or 'regex' of the element content. The element content can be: InnerText, InnerMarkup, OuterMarkup, TextContent (default), StartTagContent. -``` + +```` // Find element with TextContent has literal value: Education // l: signifies literal Element e = Find.ByContent("l:Education"); @@ -138,64 +118,68 @@ IList alle = Find.AllByContent("p:car") // TextContent of div1 : Text1 {non-recursive} // // Default for ByContent is TextContent which is the most common usage. -``` +```` - **Find.ByExpression()**
- **Find.AllByExpression()** + Find.ByExpression()
+ Find.AllByExpression() Searches for an element or 'All' elements matching an HtmlFindExpression. The HtmlFindExpression cannot use any type of hierarchical expressions including tag index path expressions, HTML path expressions, and XPath expressions. -``` + +```` // Create an HtmlFindExpression element HtmlFindExpression expr = new HtmlFindExpression("id=?sam","class=~bar","textcontent=!foo"); // Return all elements matching HtmlFindExpression IList allSams = Find.AllByExpression(expr); -``` +```` - **Find.ByXPath()**
- **Find.AllByXPath()** + Find.ByXPath()
+ Find.AllByXPath() Searches for an element or 'All' elements using an XPath expression. WebAii supports the .NET Framework XPath implementation. -``` + +```` // Find the banner img element Element img = Find.ByXPath("//body[1]/table[1]/tbody[1]/tr[1]/td[1]/img[1]"); // Find all times with id=div IList allDivs = Find.AllByXPath("/descendant::node()[starts-with(@id,'div')]"); -``` +```` - **Find.ByCssSelector()**
- **Find.AllByCssSelector()** + Find.ByCssSelector()
+ Find.AllByCssSelector() Searches for an element or 'All' elements using a css selector query. -``` + +```` // Find the active link HtmlAnchor activeLink = Find.ByCssSelector("a:active"); // Find all links IList allLinks = Find.AllByCssSelector("a"); -``` +```` - **Find.AllByTagName()** + Find.AllByTagName() Searches for 'All' elements with the specified tag name and returns it as a list of elements. -``` + +```` // Return all img elements IList allimg = Find.AllByTagName("img"); -``` +```` - **Find.ByNodeIndexPath()** + Find.ByNodeIndexPath() Searches for an element using dom tree node index paths. This identification is done using an xpath like approach that simply describes the hierarchy path to a specific element using the node index within the hierarchy without having to specify the tag name at each level. This identification method can be chosen in cases where a segment of the DomTree hierarchy at a specific location is consistent but element type changes. For example, if an element you are trying to target is the direct child of another element that fluctuates between a span and div, you can choose this identification method to provide a consistent way to identify that element. -``` +```` Given this DOM: @@ -217,25 +201,27 @@ Given this DOM: // We can find the element by: Element target = Find.ByNodeIndexPath("0/2/0/1"); -``` +```` - **Find.FromCollection()** + Find.FromCollection() Finds all elements with the FindParams in the passed in collection. -``` + +```` FindParamCollection col = FindParamCollection.LoadFromXml(xml); return this.FromCollection(col); -``` +```` - **Find.ByCustom()**
- **Find.AllByCustom()** + Find.ByCustom()
+ Find.AllByCustom() Searches for an element or 'All' elements using a custom predicate. -``` + +```` // Find the first input button having an ID of 'input1' HtmlInputButton btn = Find.ByCustom( delegate(HtmlInputButton e) @@ -247,12 +233,12 @@ HtmlInputButton btn = Find.ByCustom( } ); Assert.IsNotNull(btn); -``` +```` -##Identification Methods Usage## +## Identification Methods Usage Telerik Testing Framework identification methods are accessible using the **Find** object that is exposed as a property off of the 'Browser' object : *Manager.ActiveBrowser.Find.Byxx(...)* and also as a property off of each TestRegion object : *TestRegion.Find.Byxx(...)*. @@ -260,7 +246,7 @@ The difference between the Find object off of the Browser class (Root Base Ident With TestRegions, depending on the areas of the application that each automated test is targeting, you can use different Find objects to give each test a greater level of independence and shield it from product changes outside its target area. This topic is discussed in greater details in Introduction to TestRegions. -##Matching Syntax Used in Parameters## +## Matching Syntax Used in Parameters The Byxxx functions that take a nameValuePairs parameter recognizes the following matching syntax: @@ -280,11 +266,11 @@ The Byxxx functions that take a content string parameter recognizes the followin * Prefix the string parameter with 'x:' for regular expression matching. e.g. 'x:[*foo*]' will match any content containing the string 'foo' in the middle of it. For more information about regular expressions see: http://msdn.microsoft.com/en-us/library/2k3te2cs.aspx. -##Identification Sample## +## Identification Sample To help illustrate the above identification methods, let's use the following sample application. Note that this application uses TestRegions excessively to allow it to demonstrate the different identification methods that can be performed using both **RBI** and **RGBI**: -```HTML +````HTML @@ -328,11 +314,11 @@ To help illustrate the above identification methods, let's use the following sam -``` +```` The code below shows the different methods you can use in your test code to identify elements. Note in the sample below, we are using Visual Studio's Assert class to demonstrate how different objects can be identified differently and to illustrate how to scope the identification with TestRegions using RGBI and across the entire document DomTree using RBI. -```C# +````C# // Set the short-cuts to the main automation objects. Browser brwser = mgr.ActiveBrowser; Find rootFind = brwser.Find; @@ -386,8 +372,8 @@ Assert.IsTrue(rootFind.ByNodeIndexPath("1/0/0").TagName.Equals("div", StringComp //*** Using name Assert.IsNull(r1.Find.ByName("bla")); -``` -```VB +```` +````VB ' Set the short-cuts to the main automation objects. Dim brwser As ArtOfTest.WebAii.Core.Browser = Manager.ActiveBrowser Dim rootFind As Find = brwser.Find @@ -441,4 +427,4 @@ Assert.IsTrue(rootFind.ByNodeIndexPath("1/0/0").TagName.Equals("div", StringComp '*** Using name Assert.IsNull(r1.Find.ByName("bla")) -``` \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/element-identification/linq-queries.md b/docs-teststudiodev/code-in-test/element-identification/linq-queries.md index 3ca34780..0bde9878 100644 --- a/docs-teststudiodev/code-in-test/element-identification/linq-queries.md +++ b/docs-teststudiodev/code-in-test/element-identification/linq-queries.md @@ -4,7 +4,7 @@ page_title: LINQ Queries - Test Studio Dev Documentation description: LINQ Queries position: 1 --- -#LINQ Queries# +# LINQ Queries The Find.Byxxx methods now support Language-Integrated Query (LINQ) queries. Some of the Find functions are intended to be used by LINQ queries only. These include: @@ -13,24 +13,27 @@ The Find.Byxxx methods now support Language-Integrated Query (LINQ) queries. Som - + - - - + + +
MethodsDescriptionExample
**AllElements** + +**AllElements** Gets a IEnumerable for all elements to be used for LINQ queries. var inlineStyledElements = Find.AllElements().Where(element =>
element.ContainsAttribute("style"));
**AllControls**Gets an IEnmerable for TControl to be used for LINQ queries. This will return only elements that are convertable to TControl.var images = Find.AllControls(); + +**AllControls**Gets an IEnmerable for TControl to be used for LINQ queries. This will return only elements that are convertable to TControl. + +`var images = Find.AllControls();`
Using LINQ we can create strongly typed advanced queries with intellisense support that we couldn't before. The most basic LINQ example is something like this: -### __[VB]__ - - {{region }} - +````C# // Find all images on a page. var images = Find.AllControls(); @@ -38,14 +41,11 @@ Using LINQ we can create strongly typed advanced queries with intellisense suppo { // Do what you want with each img. } - {{endregion}} +```` We can also use lambda expressions like this: -### __[VB]__ - - {{region }} - +````C# // Find the first element that contains "Go Google" Element el = Find.ByCustom(e => e.TextContent.Contains("Go Google")); @@ -69,4 +69,4 @@ We can also use lambda expressions like this: // Fetch a list of HTML anchor's that contain 'a' in the ID IList li = (from b in Find.AllElements() where b.IdAttributeValue.Contains("a") select b).ToArray(); Assert.IsTrue(li.Count > 0); - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/features-in-code.md b/docs-teststudiodev/code-in-test/features-in-code.md index 7b16cc59..70286caf 100644 --- a/docs-teststudiodev/code-in-test/features-in-code.md +++ b/docs-teststudiodev/code-in-test/features-in-code.md @@ -12,9 +12,9 @@ __Test Studio Dev__ allows you to implement coded solutions for a scenario that __Test Studio Dev__ supports coded steps. This allows you to write code and have it executed as a test step. Use a coded step for a scenario where you need to extend the recorded steps functionality. -1.  Add a coded step from the Step Builder under the _Common_ section. +1. Add a coded step from the Step Builder under the _Common_ section. -![Add a coded step][1] +![Add a coded step](images/fig1.png) Inserting the first __Coded step__ in a test automatically generates a code behind file for the current test and opens it ready for editing. @@ -31,7 +31,7 @@ Each next coded step allows you to choose whether to reuse any of the existing m Almost each recorded step could be edited in code from the Step Context menu. The steps which could not be converted because of their specifics are dialog handling steps, all condition steps (if...else, loop, while) and the Manual step and Inspection Point step in the Common section of the Step Builder. -![Convert step into code][5] +![Convert step into code](images/fig5.png) This will generate a code-behind file (if this is the first coded step for the test) or will add a new method to the already existing code-behind file. The method for a recorded step will contain the required actions in code to execute all actions for the step. @@ -39,11 +39,11 @@ This will generate a code-behind file (if this is the first coded step for the t The code-behind file is automatically generated when a coded step is inserted in a test. A plain code behind file (without inserted methods) can be generated by clicking the _Add Code Behind File_ button. -![Add Code Behind File][3] +![Add Code Behind File](images/fig3.png) The code-behind file is nested under the parent test in Solution Explorer: -![Code Behind File][4] +![Code Behind File](images/fig4.png) A code behind file can be generated for each test where you need to implement coded steps and custom test classes. That coded file and its methods are related to the particular test. @@ -56,8 +56,3 @@ A code behind file can be generated for each test where you need to implement co You can implement any custom logic organized in standalone code files located in your project. This includes but is not limited to classes and functions which perform common or often re-used functionality and can be called by your coded steps or code behind methods. The only requirement is to define classes in the project namespace else they will not be accessible. -[1]: images/fig1.png -[2]: images/fig2.png -[3]: images/fig3.png -[4]: images/fig4.png -[5]: images/fig5.png \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/generate-unit-test.md b/docs-teststudiodev/code-in-test/generate-unit-test.md index 054427c5..d26e83c0 100644 --- a/docs-teststudiodev/code-in-test/generate-unit-test.md +++ b/docs-teststudiodev/code-in-test/generate-unit-test.md @@ -22,15 +22,14 @@ A unit test file and XML file containing your data are created in your Test Proj **Note:** When you convert an entire test to code, it doesn't take into account the **Enable Silverlight** setting. You need to enable it in code prior to the LaunchNewBrowser call: -```C# +````C# Manager.Settings.Web.EnableSilverlight = true; Manager.LaunchNewBrowser(); -``` - -```VB +```` +````VB Manager.Settings.Web.EnableSilverlight = True Manager.LaunchNewBrowser() -``` +```` ## Preview Code diff --git a/docs-teststudiodev/code-in-test/html-control-suite/custom-html-control.md b/docs-teststudiodev/code-in-test/html-control-suite/custom-html-control.md index 6620429b..098c3de5 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/custom-html-control.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/custom-html-control.md @@ -4,13 +4,13 @@ page_title: Custom HtmlControl - Test Studio Dev Documentation description: Custom HtmlControl position: 2 --- -#Creating Your Own Custom HtmlControls# +# Creating Your Own Custom HtmlControls Let's suppose you're testing a web site that uses a third party or custom control. You can easily create your own custom HtmlControl class and then design tests that interact with the custom control via your custom HtmlControl class. As an example, let's create a custom HtmlControl that wraps the ASP.NET calendar control. We'll give it some methods for reading and controlling the date selection along with a custom ClientSideLocator just for an example. First here's our ASPX web page containing a calendar control that we want to test -``` +```` <% @ Page Language="C#" MasterPageFile="~/AppMaster.master" Title="Untitled Page" %> <% @ Import Namespace="System.Data" %> <% @ Register Assembly="ArtOfTest.WebAii.AspNet" Namespace="ArtOfTest.WebAii.AspNet.WebControls" TagPrefix="test" %> @@ -146,14 +146,11 @@ As an example, let's create a custom HtmlControl that wraps the ASP.NET calendar -``` +```` Let's put together our custom HtmlControl that we can use interact with an ASP.NET calendar control: -#### __[C#]__ - - {{region }} - +````C# public class AspNetCalendar : HtmlTable { /// @@ -284,12 +281,8 @@ Let's put together our custom HtmlControl that we can use interact with an ASP.N return GetMonth(); } } - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Public Class AspNetCalendar Inherits HtmlTable ''' @@ -408,7 +401,7 @@ Let's put together our custom HtmlControl that we can use interact with an ASP.N Return GetMonth() End Function End Class - {{endregion}} +```` Notice how we derive from an HtmlTable. That way we can take advantage of all the functionality already built into a standard table. We'll just add all the functions useful for our calendar control which include: diff --git a/docs-teststudiodev/code-in-test/html-control-suite/drag-and-drop.md b/docs-teststudiodev/code-in-test/html-control-suite/drag-and-drop.md index 65f36f0c..5c22ce3c 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/drag-and-drop.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/drag-and-drop.md @@ -4,7 +4,7 @@ page_title: Drag & Drop - Test Studio Dev Documentation description: Drag & Drop position: 2 --- -#How to Drag and Drop# +# How to Drag and Drop The HTML element wrapper classes make mouse drag & drop operations significantly easier. There are 7 different drag methods defined: @@ -33,10 +33,7 @@ The HTML element wrapper classes make mouse drag & drop operations significantly Suppose we have an sales by area table that supports drag & drop between cells. We can easily drag & drop the contents of one cell to another cell like this: -#### __[C#]__ - - {{region }} - +````C# // Find the sales table HtmlTable salesTable = Find.ById("area_1_table"); @@ -46,13 +43,8 @@ salesTable.BodyRows[3].Cells[1].DragTo(salesTable.BodyRows[2].Cells[1]); // Verify the new row subtotals are correct Assert.AreEqual(salesTable.Rows[2].Cells[5].TextContent, "$3342.78"); Assert.AreEqual(salesTable.Rows[3].Cells[5].TextContent, "$2175.17"); -{{endregion}} - - -#### __[VB]__ - - {{region }} - +```` +````VB ' Find the sales table Dim salesTable As HtmlTable = Find.ById(Of HtmlTable)("area_1_table") @@ -62,4 +54,4 @@ salesTable.BodyRows(3).Cells(1).DragTo(salesTable.BodyRows(2).Cells(1)) ' Verify the new row subtotals are correct Assert.AreEqual(salesTable.Rows(2).Cells(5).TextContent, "$3342.78") Assert.AreEqual(salesTable.Rows(3).Cells(5).TextContent, "$2175.17") -{{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/html-control-suite/element-styles.md b/docs-teststudiodev/code-in-test/html-control-suite/element-styles.md index 1db155db..c46071bf 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/element-styles.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/element-styles.md @@ -4,7 +4,7 @@ page_title: Element Styles - Test Studio Dev Documentation description: Element Styles position: 2 --- -#Element Styles and HtmlStyle, GetStyle, GetComputedStyle# +# Element Styles and HtmlStyle, GetStyle, GetComputedStyle Telerik Testing Framework includes a good set of classes and methods for reading and validating the styles often attached to HTML controls. With this feature you can do things like: @@ -25,10 +25,7 @@ Telerik Testing Framework includes a good set of classes and methods for reading Let's look at some code samples to see how this works: -#### __[C#]__ - - {{region }} - +````C# // Verify the color of the warning text is Red HtmlSpan warningSpan = Find.ById("Warning"); HtmlStyle warningColorStyle = warningSpan.GetStyle("color"); @@ -64,14 +61,11 @@ HtmlStyle warningMarginStyle = warningSpan.GetStyle("margin"); Assert.IsTrue(warningMarginStyle.IsInt()); int warningMargin = warningMarginStyle.ToInt(); Assert.AreEqual(30, warningMargin); -{{endregion}} +```` -#### __[VB]__ - - {{region }} - +````VB ' Verify the color of the warning text is Red Dim warningSpan As HtmlSpan = Find.ById(Of HtmlSpan)("Warning") Dim warningColorStyle As HtmlStyle = warningSpan.GetStyle("color") @@ -105,17 +99,14 @@ Assert.AreEqual(30, warningMargin); Assert.IsTrue(warningMarginStyle.IsInt()) Dim warningMargin As Integer = warningMarginStyle.ToInt() Assert.AreEqual(30, warningMargin) - {{endregion}} +```` The GetComputedStyle is especially powerful. It will follow the CSS chain up through all the parent elements until it finds the first matching style and returns the value picked up from that style. This is quite different from GetStyle which only returns an explicitly set style value on the specific element (i.e. it does not follow the CSS chain). If no explicit value has been set then GetStyle returns an empty string for the value. Here's an example: -#### __[C#]__ - - {{region }} - +````C# // GetStyle returns the value of an explicit style applied to the element. // If the element does not have an explicit style applied, GetStyle returns an empty value. // Since our warning span does not have the padding style explicitly applied to it, @@ -128,13 +119,10 @@ Here's an example: // Therefore GetComputedStyle on the warning span will return the value set in the parent form tag. paddingStyle = warningSpan.GetComputedStyle("padding"); Assert.IsFalse(string.IsNullOrEmpty(paddingStyle.Value)); - {{endregion}} - - -#### __[VB]__ +```` - {{region }} +````VB ' GetStyle returns the value of an explicit style applied to the element. ' If the element does not have an explicit style applied, GetStyle returns an empty value. ' Since our warning span does not have the padding style explicitly applied to it, @@ -147,4 +135,4 @@ Here's an example: ' Therefore GetComputedStyle on the warning span will return the value set in the parent form tag. paddingStyle = warningSpan.GetComputedStyle("padding") Assert.IsFalse(String.IsNullOrEmpty(paddingStyle.Value)) - {{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/html-control-suite/find-and-navigate-elements.md b/docs-teststudiodev/code-in-test/html-control-suite/find-and-navigate-elements.md index 9131b557..b54e7f2c 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/find-and-navigate-elements.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/find-and-navigate-elements.md @@ -4,15 +4,12 @@ page_title: Find and Navigate Elements - Test Studio Dev Documentation description: Find and Navigate Elements position: 2 --- -#Finding and Navigating HTML Elements# +# Finding and Navigating HTML Elements The example above used just two of the available find methods, the Find.ById<**TControl**> and the Find.AllByTagName<**TControl**> and did not take advantage of the powerful navigation features. Let's look at some other find examples: -#### __[C#]__ - - {{region }} - +````C# // Find the first table on the page. HtmlTable outertable = Find.ByTagIndex("table", 0); @@ -42,13 +39,10 @@ Assert.AreEqual(1, imgCtrls.Count); // Find the
section containing the Eastern US Division sales report HtmlDiv EasternUSDivision = Find.ByContent("Eastern US Division", FindContentType.TextContent); Assert.IsNotNull(EasternUSDivision); -{{endregion}} - - -#### __[VB]__ +```` - {{region }} +````VB ' Find the first table on the page. Dim outertable As HtmlTable = Find.ByTagIndex(Of HtmlTable)("table", 0) Assert.AreEqual(3, outertable.Rows.Count) @@ -79,15 +73,12 @@ Assert.IsNotNull(EasternUSDivision); ' Find the
section containing the Eastern US Division sales report Dim EasternUSDivision As HtmlDiv = Find.ByContent(Of HtmlDiv)("Eastern US Division", FindContentType.TextContent) Assert.IsNotNull(EasternUSDivision) - {{endregion}} +```` The above example demonstrates how to use many of the more useful find methods. There are many more. It would take up too much space to try and document them all here. Refer to the API reference to learn about the others. Let's look at some HTML navigation functions: -#### __[C#]__ - - {{region }} - +````C# // Traverse the control tree upwards too. You can easily // Find the container control of a certain type from its children. @@ -113,14 +104,11 @@ The above example demonstrates how to use many of the more useful find methods. // Find the form this table is contained in. HtmlForm form1 = table2.Parent(); Assert.IsTrue(form1.ID.Equals("form1")); - {{endregion}} +```` -#### __[VB]__ - - {{region }} - +````VB ' Traverse the control tree upwards too. You can easily ' Find the container control of a certain type from its children. @@ -147,4 +135,4 @@ Assert.IsTrue(table2.ID.Equals(outertable.ID)) ' Find the form this table is contained in. Dim form1 As HtmlForm = table2.Parent(Of HtmlForm)() Assert.IsTrue(form1.ID.Equals("form1")) -{{endregion}} \ No newline at end of file +```` \ No newline at end of file diff --git a/docs-teststudiodev/code-in-test/html-control-suite/get-set-properties.md b/docs-teststudiodev/code-in-test/html-control-suite/get-set-properties.md index 23ab10b4..12ca8dae 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/get-set-properties.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/get-set-properties.md @@ -4,15 +4,12 @@ page_title: Get & Set Properties - Test Studio Dev Documentation description: Get & Set Properties position: 2 --- -#Getting and Setting Properties# +# Getting and Setting Properties We can also get and set the current value of any property of the wrapped element: -#### __[C#]__ - - {{region }} - +````C# // Get whether a checkbox is enabled or disabled. HtmlInputCheckBox cks = Find.ById("checkbox1"); bool disabled = cks.GetValue("disabled"); @@ -36,14 +33,11 @@ string strColor = mySpan.GetStyleValue("color"); // style. HtmlStyle styleMargin = mySpan.GetComputedStyle("margin"); string strMargin = mySpan.GetComputedStyleValue("margin"); -{{endregion}} +```` -#### __[VB]__ - - {{region }} - +````VB ' Get whether a checkbox is enabled or disabled. Dim cks As HtmlInputCheckBox = Find.ById(Of HtmlInputCheckBox)("checkbox1") Dim disabled As Boolean = cks.GetValue(Of Boolean)("disabled") @@ -61,6 +55,6 @@ Dim strColor As String = mySpan.GetStyleValue("color") ' style. Dim styleMargin As HtmlStyle = mySpan.GetComputedStyle("margin") Dim strMargin As String = mySpan.GetComputedStyleValue("margin") -{{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/html-control-suite/html-actions.md b/docs-teststudiodev/code-in-test/html-control-suite/html-actions.md index f4514b8a..e87765b7 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/html-actions.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/html-actions.md @@ -4,7 +4,7 @@ page_title: HTML Actions - Test Studio Dev Documentation description: HTML Actions position: 2 --- -#Common HTML Control Actions# +# Common HTML Control Actions What are some of the things we can do after finding the element we want to act upon? We can: @@ -22,10 +22,7 @@ What are some of the things we can do after finding the element we want to act u Here are some examples: -#### __[C#]__ - - {{region }} - +````C# // All controls have a Click/MouseClick. The .Click invokes a click from the DOM, // the MouseClick(), moves the mouse to the control and clicks it. @@ -116,13 +113,8 @@ Here are some examples: // Invoke any events on the control link.InvokeEvent(ScriptEventType.OnFocus); - {{endregion}} - - -#### __[VB]__ - - {{region }} - +```` +````VB ' All controls have a Click/MouseClick. The .Click invokes a click from the DOM, ' the MouseClick(), moves the mouse to the control and clicks it. @@ -213,4 +205,4 @@ Here are some examples: ' Invoke any events on the control link.InvokeEvent(ScriptEventType.OnFocus) - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/html-control-suite/html-asserts.md b/docs-teststudiodev/code-in-test/html-control-suite/html-asserts.md index e8848095..7e07366a 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/html-asserts.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/html-asserts.md @@ -4,7 +4,7 @@ page_title: HTML Asserts - Test Studio Dev Documentation description: position: 2 --- -#HTML Asserts# +# HTML Asserts Telerik Testing Framework has a set of Assert classes to make validation of your HTML controls easier. An 'Assert' basically says "Verify the specified property of the control has the specified value or setting. If it doesn't have that setting/value, then throw an error and stop the test." @@ -142,10 +142,7 @@ For example: AssertCheck.IsTrue() will verify the associated checkbox control is Now let's see how this works in action: -#### __[C#]__ - - {{region }} - +````C# // Attribute checks HtmlSpan span = Find.ById("Warning"); span.AssertAttribute().Exists("style"); @@ -201,12 +198,9 @@ table.AssertTable().RowCount(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts. table.AssertTable().RowRange(ArtOfTest.Common.NumberRangeCompareType.OutsideRange, 1, 2); table.AssertTable().Contains(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.StringCompareType.Contains, "TD5"); table.AssertTable().Contains(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.StringCompareType.NotContain, "TD37"); -{{endregion}} +```` -#### __[VB]__ - - {{region }} - +````VB ' Attribute checks Dim span As HtmlSpan = Find.ById(Of HtmlSpan)("Warning") span.AssertAttribute().Exists("style") @@ -260,7 +254,7 @@ table.AssertTable().RowCount(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts. table.AssertTable().RowRange(ArtOfTest.Common.NumberRangeCompareType.OutsideRange, 1, 2) table.AssertTable().Contains(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.StringCompareType.Contains, "TD5") table.AssertTable().Contains(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.StringCompareType.NotContain, "TD37") -{{endregion}} +```` There are many other possible assert verification combinations built into the framework that you can take advantage of. The above examples are just a small subset of what is possible to help you get started implementing them in your code and crafting the kinds of verification you need for your particular website. Consult the API reference manual to learn about the other combinations. diff --git a/docs-teststudiodev/code-in-test/html-control-suite/html-wait-class.md b/docs-teststudiodev/code-in-test/html-control-suite/html-wait-class.md index ee2f739e..843d250a 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/html-wait-class.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/html-wait-class.md @@ -4,7 +4,7 @@ page_title: HtmlWait Class - Test Studio Dev Documentation description: HtmlWait Class position: 2 --- -#How to Use the HtmlWait Class# +# How to Use the HtmlWait Class The HtmlWait class extends and enhances the Element.Wait class with some powerful methods that are very useful with the HTML control suite. It adds: @@ -17,10 +17,7 @@ The HtmlWait class extends and enhances the Element.Wait class with some powerfu The HtmlWait.ForVisible and HtmlWait.ForVisibleNot use the HtmlControl.IsVisible function to test whether or not the element is currently visible in the browser. Since IsVisible follows the CSS chain, we get a true reading of whether or not the element actually is visible. For example: -#### __[C#]__ - - {{region }} - +````C# HtmlDiv div = Find.ByTagIndex("div", 0); HtmlWait waitObj = div.Wait; @@ -35,12 +32,8 @@ The HtmlWait.ForVisible and HtmlWait.ForVisibleNot use the HtmlControl.IsVisible waitObj.ForVisible(); // Wait 120 seconds for the div to become invisible waitObj.ForVisibleNot(); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB HtmlDiv div = Find.ByTagIndex("div", 0); HtmlWait waitObj = div.Wait; @@ -55,14 +48,11 @@ The HtmlWait.ForVisible and HtmlWait.ForVisibleNot use the HtmlControl.IsVisible waitObj.ForVisible(); // Wait 120 seconds for the div to become invisible waitObj.ForVisibleNot(); - {{endregion}} +```` Using the HtmlWait.ForStyles and HtmlWait.ForStylesNot methods you can wait for a particular style to be set or removed from the element. For example: -#### __[C#]__ - - {{region }} - +````C# HtmlSpan span = Find.ByTagIndex("span", 0); HtmlWait spanWaitObj = div.Wait; @@ -94,13 +84,8 @@ Using the HtmlWait.ForStyles and HtmlWait.ForStylesNot methods you can wait for // Will continue to wait if either style is still set to the specified value. // Uses the default timeout value from Settings.Current.ExecuteCommandTimeout span.Wait.ForStylesNot("backgroundColor=red", "margin=30px"); - {{endregion}} - - -#### __[VB]__ - - {{region }} - +```` +````VB Dim span As HtmlSpan = Find.ByTagIndex(Of HtmlSpan)("span", 0) Dim spanWaitObj As HtmlWait = div.Wait @@ -132,38 +117,28 @@ Using the HtmlWait.ForStyles and HtmlWait.ForStylesNot methods you can wait for ' Will continue to wait if either style is still set to the specified value. ' Uses the default timeout value from Settings.Current.ExecuteCommandTimeout span.Wait.ForStylesNot("backgroundColor=red", "margin=30px") - {{endregion}} +```` The HtmlWait.ForCondition is an advanced method that calls a user defined function to determine whether or not the wait condition has been satisfied. You, the test automation programmer, may code up any sort of wait condition you can imagine. The only requirement is that your function must return true to indicate that the condition has been satisfied or return false to indicate the condition has not been satisfied. The overloads of the HtmlWait.ForCondition are split into two virtually identical sets of three overloads. The first set operates on basic Element objects. The second set operates on Control objects, which all of the classes contained in the HTML control suite derive from. Except for this difference, they operate identically. The sample below shows only the Control version: -#### __[C#]__ - - {{region }} - +````C# HtmlTextArea textArea = Find.ByTagIndex("textarea", 0); HtmlWait textAreaWaitObj = textArea.Wait; // Wait 30 seconds for the HtmlTextArea element to contain the text "Now is the time" textArea.Wait.ForCondition(textAreaContainsStr, false, "Now is the time", 30000); - {{endregion}} - -#### __[VB]__ - - {{region }} - +```` +````VB Dim textArea As HtmlTextArea = Find.ByTagIndex(Of HtmlTextArea)("textarea", 0) Dim textAreaWaitObj As HtmlWait = textArea.Wait ' Wait 30 seconds for the HtmlTextArea element to contain the text "Now is the time" textArea.Wait.ForCondition(AddressOf textAreaContainsStr, False, "Now is the time", 30000) - {{endregion}} +```` Now we need the definition of the condition function 'textAreaContainsStr': -#### __[C#]__ - - {{region }} - +````C# /// /// Tests whether or not the HtmlTextArea element contains the specified string. /// @@ -185,13 +160,8 @@ Now we need the definition of the condition function 'textAreaContainsStr': HtmlTextArea textArea = (HtmlTextArea)ctl; return textArea.Text.Contains((string)obj); } - {{endregion}} - - -#### __[VB]__ - - {{region }} - +```` +````VB ''' ''' Tests whether or not the HtmlTextArea element contains the specified string. ''' @@ -212,4 +182,4 @@ Now we need the definition of the condition function 'textAreaContainsStr': Return textArea.Text.Contains(CType(obj, String)) End Function - {{endregion}} +```` diff --git a/docs-teststudiodev/code-in-test/html-control-suite/introduction.md b/docs-teststudiodev/code-in-test/html-control-suite/introduction.md index 5c9b159b..7d64b5d8 100644 --- a/docs-teststudiodev/code-in-test/html-control-suite/introduction.md +++ b/docs-teststudiodev/code-in-test/html-control-suite/introduction.md @@ -4,7 +4,7 @@ page_title: Introduction - Test Studio Dev Documentation description: Introduction position: 1 --- -#Intro to Test Studio Devs HTML Control Element Wrappers Suite# +# Intro to Test Studio Devs HTML Control Element Wrappers Suite Telerik Framework includes an extensive suite of strongly typed HTML element wrappers that abstracts out actions and verifications of the controls contained on the webpage. With the classes contained in the control suite you can do things like: @@ -22,7 +22,9 @@ In addition there are many other features that make the abstraction even more po
- + - + - + - + @@ -57,21 +65,27 @@ In addition there are many other features that make the abstraction even more po - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -213,7 +255,9 @@ In addition there are many other features that make the abstraction even more po - + - + - +
HTML ControlDescriptionPropertiesMethodsBase Class
**HtmlAnchor** + +**HtmlAnchor** Wraps access to a HTML \ anchor element. HRef
Name
@@ -32,7 +34,9 @@ In addition there are many other features that make the abstraction even more po
HtmlContainerControl
**HtmlButton** + +**HtmlButton** Wraps access to a HTML \ Disabled Name
@@ -42,14 +46,18 @@ In addition there are many other features that make the abstraction even more po
HtmlContainerControl
**HtmlDefinitionDescription** + +**HtmlDefinitionDescription** Wraps access to a HTML \
element . This control is used by the HtmlDefinitionList control.
Description HtmlContainerControl
**HtmlDefinitionList** + +**HtmlDefinitionList** Wraps access to a HTML \
element.
Descriptions
Terms
HtmlContainerControl
**HtmlDefinitionTerm** + +**HtmlDefinitionTerm** Wraps access to a HTML \
element. This control is used by the HtmlDefinitionList control.
Terms HtmlContainerControl
**HtmlDiv** + +**HtmlDiv** Wraps access to a HTML \
container element.
HtmlContainerControl
**HtmlForm** + +**HtmlForm** Wraps access to a HTML \
element.
EncType
Length
@@ -81,7 +95,9 @@ In addition there are many other features that make the abstraction even more po
HtmlContainerControl
**HtmlImage** + +**HtmlImage** Wraps access to a HTML \ element. Align
Alt
@@ -93,7 +109,9 @@ In addition there are many other features that make the abstraction even more po
HtmlControl
**HtmlInputButton** + +**HtmlInputButton** Wraps access to a HTML \ element. Align
Alt
@@ -105,28 +123,36 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlInputCheckBox** + +**HtmlInputCheckBox** Wraps access to a HTML \ element. Checked Check HtmlInputControl
**HtmlInputFile** + +**HtmlInputFile** Wraps access to a HTML \ element. FilePath Upload HtmlInputControl
**HtmlInputHidden** + +**HtmlInputHidden** Wraps access to a HTML \ element. HtmlInputControl
**HtmlInputImage** + +**HtmlInputImage** Wraps access to a HTML \ element. Align
Alt
@@ -138,7 +164,9 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlInputPassword** + +**HtmlInputPassword** Wraps access to a HTML \ element. Disabled Size
@@ -148,14 +176,18 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlInputRadioButton** + +**HtmlInputRadioButton** Wraps access to a HTML \ element. Cheched Check HtmlInputControl
**HtmlInputReset** + +**HtmlInputReset** Wraps access to a HTML \ element. Align
Alt
@@ -167,7 +199,9 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlInputSubmit** + +**HtmlInputSubmit** Wraps access to a HTML \ element. Align
Alt
@@ -179,7 +213,9 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlInputText** + +**HtmlInputText** Wraps access to a HTML \ element. Disabled
Size
@@ -189,14 +225,18 @@ In addition there are many other features that make the abstraction even more po
HtmlInputControl
**HtmlListItem** + +**HtmlListItem** Wraps access to a HTML \
  • element. This control is used by the HtmlOrdererList control and the HtmlUnorderedList control.
  • GetItemOrder HtmlContainerControl
    **HtmlOption** + +**HtmlOption** Wraps access to a HTML \ Selected
    Text
    @@ -205,7 +245,9 @@ In addition there are many other features that make the abstraction even more po
    HtmlControl
    **HtmlOrderedList** + +**HtmlOrderedList** Wraps access to a HTML \
      .
    AllItems
    Itemst
    HtmlContainerControl
    **HtmlSelect** + +**HtmlSelect** Wraps access to a HTML \ Options
    SelectedIndex
    @@ -230,14 +274,18 @@ In addition there are many other features that make the abstraction even more po
    HtmlContainerControl
    **HtmlSpan** + +**HtmlSpan** Wraps access to a HTML \ inline text container element. HtmlContainerControl
    **HtmlTable** + +**HtmlTable** Wraps access to a HTML \ table element containing rows and columns. - + - + element. - +
    AllRows
    BodyRows
    @@ -255,7 +303,9 @@ In addition there are many other features that make the abstraction even more po
    HtmlContainerControl
    **HtmlTableCell** + +**HtmlTableCell** Wraps access to a HTML \ table cell element. Align
    BgColor
    @@ -271,7 +321,9 @@ In addition there are many other features that make the abstraction even more po
    HtmlContainerControl
    **HtmlTableRow** + +**HtmlTableRow** Wraps access to a HTML \
    Align
    BgColor
    @@ -284,7 +336,9 @@ In addition there are many other features that make the abstraction even more po
    HtmlContainerControl
    **HtmlTextArea** + +**HtmlTextArea** Wraps access to a HTML \