Telerik Forums
Test Studio Forum
5 answers
254 views
Hi there,

I am checking for element in the screen not exist, I used "Wait element not exist", the element in the screen was exist, I expect this test should fail, but the check is pass, but when I add Execution Delay "Wait for '500' " before the checking, the test for element not exist is fail as expected. My questions are, how I know I need to add exection delay? and do I used the wright command for checking on element does not exist?   

Your help and support is much appreciated

Talal
Cody
Telerik team
 answered on 24 Apr 2013
1 answer
308 views
I am using Telerik.Testing.Framework.2012.2.1527
I am using the below code. I am getting null for "findElem" all the time. but when I am in debug mode it is fine. WaitUntilReady(); is not working as expected for me. In my scenario I should not be using waitforelement and specify timeout.

public bool IsPresentbyInputId(string findCondition)
{
    Manager.ActiveBrowser.WaitUntilReady();
    Element findElem = Manager.ActiveBrowser.Find.ByExpression(new HtmlFindExpression("tagname=input", "id=" + findCondition));
    Manager.ActiveBrowser.WaitUntilReady();
    return findElem != null && !findElem.Attributes.Any(s => s.Value.Contains("display:none"));
}

If I set the Execution Delay to >500, my tests are running fine. But if I give it 0 they fail to find elements.
Manager.Settings.ExecutionDelay = 500;
Can you let m know what I am missing here?
Cody
Telerik team
 answered on 24 Apr 2013
1 answer
72 views
I Have in C# Script:

            try
            {
                ActiveBrowser.WaitForElement(Pages.Deuba_Relaunch_FR_Navigation.Expressions.Productoverview_Article, 3000, false);        
            }
            catch
            {
                Log.WriteLine( "Productoverview Div Article not found");
                return false;
            }


That works, but here i dont want the Failure Information because I have the Log-Information
Thanks for Help
Plamen
Telerik team
 answered on 24 Apr 2013
2 answers
261 views
I am using a procedure which is checking the controls of an dynamic loades page.
The page is loaded via a menu links with different product parameters.
The link is clicked as an step, then the procedure is called in an following step.

Sometimes I get this error:
------------------------------------------------------------
'22.04.2013 16:45:27' - Error encountered during execution.
------------------------------------------------------------
'22.04.2013 16:45:27' - Error attempting to exit runner. Error: System.IO.IOException: Pipe is broken.
   at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
   at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at ArtOfTest.WebAii.Design.Execution.RunnerController.Exit()
------------------------------------------------------------
'22.04.2013 16:45:27' - Aborting....


Hmm, getting more and more frustrated

Velin Koychev
Telerik team
 answered on 24 Apr 2013
2 answers
129 views
I check the selected Text of an Dropdown element (step before: check if exists with success)
after the second run, i get this error
'23.04.2013 12:35:14' - 'Fail' : 32. 2_17_Verify selection 'ByText' is 'Tous' on 'ProductOverview_Filter_DerivativeType_Select'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Object reference not set to an instance of an object.
InnerException:
System.NullReferenceException: Object reference not set to an instance of an object.
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SelectVerificationDescriptor.ExtractData(IAutomationHost targetBrowser, DescriptorValueStore dataStore)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order) 

I selected this element for mthe element list, selected from the suggrestion list the Verification Select 'byText' and modified the wanted text in the Inline Editor

What is the problem,how can i solve it ask a now VERY frustrateD Michael


Velin Koychev
Telerik team
 answered on 24 Apr 2013
2 answers
151 views
Hi,

I have following scenario:

1. Open Mail
2. Copy URL from mail (Link is disabled in mail so can't click to open)
3. Paste in in new browser and work

I am able to extract the url but passing it new browser is sometime failing due to characters like %3d. I am using following code:

1. Extracted variable : StagingLink
2. Link=GetExtractedValue("StagingLink");

 3.        Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true);
            Browser ie = Manager.ActiveBrowser;
            ie.NavigateTo((string)ViewMail.Link,true);

Here part of URL where "%3d" is present is changed to "="  during string conversion so not working. Please help


Velin Koychev
Telerik team
 answered on 23 Apr 2013
3 answers
112 views
Hello,

I have some questions regarding test recording.

First of all, I am interested to know if it is possible to give different input parameters for a recorded test. For example, I have a test which adds/deletes/updates information in a grid. I want to know if it is possible to give a list of parameters, in an excel or text file, and to execute the test for each parameter or group of parameters in the file. Or, another scenario, to gine parameters in an excel/text file and have several tests execute with parameters from the files. For example, first test executes with first parameters in the list, second with the enxt parameters and so on.

Secondly, does Test Studio have an out of the box solution for checking information in the database? For example, if I have some operations on a grid, and then I add an assertion which checks that a certain element was inserted, I want to also check if it was inserted in the database or not. I know about the possibility to add a coded step, but I was wondering if there might be any other way.

Thank you,
Corina
Boyan Boev
Telerik team
 answered on 23 Apr 2013
2 answers
165 views
Hello again,

I would like to be able to run a database script before a test executes or even during test execution would be great.
I was wondering if it was possible.

For example, In my website I need to log in as a certain user to access their roles and privileges, but this user might be logged into the system.  So, I would like to be able to run a database script that terminates their session and it would allow me to log in as that user before my test executes.

Thanks for any help provided.
Byron
Telerik team
 answered on 22 Apr 2013
1 answer
182 views
In an C# Script the following works:
            Element mainContent;
            mainContent = ActiveBrowser.WaitForElement(Pages.Deuba_Relaunch_FR_Navigation.Expressions.Productoverview_Maincontent_Div, 3000, false);        

How can i find an Element in mainContent, for Example an Div ?

It should give me back an HtmlDiv-element like

 HtmlDiv itemCount = Find.ByExpression<HtmlDiv>(new HtmlFindExpression("class=itemCount"));

Thanks for your help




Boyan Boev
Telerik team
 answered on 22 Apr 2013
7 answers
121 views
I am new to this so I apologise in advance.
I have two tests, one is a login test and another then selects the appropriate menu options once the user has logged in.
I have set the base url for the first test which is http://localhost:4547/SelfService/Default.aspx. The second test nees to continue where the first test ended. Im unsure how to do this?
I have both tests within a test list, is this the correct method?
Darren
Top achievements
Rank 1
 answered on 19 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?