Hello,
I try to use your code in the tutorial , which is :
int length = 8;
//Define the included characters
string charSet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
Random random = new Random();
string randomText = new String(Enumerable.Repeat(charSet, length).Select(set => set[random.Next(set.Length)]).ToArray());
Find.ById<HtmlInputText>("search-cif").Text = randomText;
Find.ById<HtmlInputSubmit>("img-search-cif").Click();
But there's no random text generated and it keep failed.
Error :
Object reference not set to an instance of an object.
Can i know why or how im supposed to use the code ?
Hello ,
I have a little bit problem over here, since my test need to call a new browser and go to a second URL which is the tests would run in that active browser (2nd broswer) then have the browser close once the tests are done in that one and continue on in the old browser (1st browser). The question here, is it Test Studio have the function to call the 2nd browser ? if have, please make a tutorial step by step since im the beginner in using this test studio.
Thanks,
Kay Azlan
On one of our webpage, on clicking the button we display the list of records. We have a loading screen with a text in <p> that is displayed until the records are fetched from DB.
I need to set some wait time using the text in <p> such that it waits until text is displayed before proceeding to the next steps. Once the text is replaced with the list items, want it to resume playback. What should I be using in this case?
Thanks
Satpreet
I need some help with some problems that's been preventing me from using the test studio.
Very often when I add a coded step in newly created test, the compilation fails and gives me this error:
'01/01/2015 14:09:53' - System.ArgumentException: Unable to find the test class type 'TestProject2.WebTest' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureTypeExists(Assembly assm, String typeName)
at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
The test has only a single test step and it's a coded step without any code written.
If I were to delete the step and clear the script file, then add any steps that aren't coded step, it will have no problem compiling.
All the other tests that existed before this test runs perfectly fine.
This problem cannot be resolved by creating new tests, but only by creating a new project.
There's another error besides the mentioned one that's been occurring just as often, it's also caused by adding a coded step.
This time the codes compiles without error, but throws an exception when the coded step was hit:
Exception thrown executing coded step: '[TEST_001_Inbox_Actions_CodedStep] : New Coded Step'.
The coded step method 'TEST_001_Inbox_Actions_CodedStep' does not exist.
The step hasn't have any code written to it and the method name is the one that was generated by the test studio.
There's another version to this problem, sometimes it doesn't throw the exception unless the name of the method is changed.
Even if I stick to the method name that was originally generated for, the test will compile and run,
but the codes I've written in that method would have no effect whatsoever.
My guess is that the code behind did not get updated and the changed code wasn't compiled.
Product Version: 2014.4.1211.0
Unfortunately there are no logs to be found. Does anyone know where the log in question is?
I have noticed that the confirm dialogue is not working properly in Chrome (v60), what worked in the previous versions.
Data from result viewer...
------------------------------------------------------------
'13.8.2017 13:37:56' - Using 'Chrome' version '60.0.3112.90' as default browser.
'13.8.2017 13:37:56' - Using 'http://sw-fitnes/BAP/' as base url.
'13.8.2017 13:38:17' - 'Fail' : 4. Click 'DeleteImage'
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'aeb9ed43-376e-44ca-94b3-355dba153faf',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.TimeoutException: Timed out waiting for command to be handled
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId, Int32 timeout)
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'aeb9ed43-376e-44ca-94b3-355dba153faf',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.TimeoutException: Timed out waiting for command to be handled
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId, Int32 timeout)
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
---> System.TimeoutException: Timed out waiting for command to be handled
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId, Int32 timeout)
at ArtOfTest.WebAii.Messaging.Process.BrowserHostsProxyRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
at ArtOfTest.WebAii.Core.Browser.IsReady()
at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ClickActionDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'13.8.2017 13:38:17' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
I have Test Studio ver. 2015.2. All of a sudden, it started crashing on startup. In the Event Log, I got the following error:
Application: Telerik.TestStudio.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at Telerik.Licensing.BuildsNotificationManager.IsNewerVersion()
at Telerik.Licensing.LicenseManager+<>c__DisplayClass6.<CheckForUpdatesAsync>b__2()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
This is a test-authoring question about how to organize tests. I have a dozen examples of places where I want to go through a data-creation process (users, forms, etc.) but I want to test and validate 3 things:
- Successful creation
- Failed creation (expecting certain blocks/failures)
- Random data input (conditionally reacting to success or failures)
Should I be creating different tests for every single kind of scenario, so that each test has only one particular purpose, or is it good practice to have a single test that has IF/ELSE blocks to handle successes and failures based on data-driven input? My programming instincts are telling me to stick with single-purpose cohesive tests, nesting them with "Test As Step" when needed, but my ease-of-use side is making me think it's a reasonable solution to have fairly conditional tests rather than creating a vast number of tests handling every unique situation.
...or maybe it's a hybrid case-by-case thing that I have to evaluate based on the application's testing needs?
Any advice is welcome!
-Steve
Could u tell me if telerik test studio support java-based technology web applications or not?
Thanks in advance