Hi Team,
I need to verify whether the hand effect is displayed when hovering over the mouse on a HtmlListItem. I tried below code piece but it's not capturing the hand effect of the mouse.
System.Windows.Forms.Cursor.Current == System.Windows.Forms.Cursors.Hand
Regards,
Harsha
Using Test Studio Ultimate, I am testing an application that sends a variety of emails that require user interaction with the Email contents (clicking links, for example). Unfortunately Gmail is an absolute mess in the DOM, and trying to find anything by ID/Class is virtually useless. At this point, the best solution I have come to is using XPath to locate elements.
When running through a bunch of iterations of my test (user setup, email notification + interaction, back to web app) the Gmail part will fail about 1/10 times on the XPath lookup. The main issue seems to be with how Test Studio reads and converts the HTML to XML, then parses it to try and find the specified XPath query. In the test failure log, I don't get a full log dump. It seems to be several hundred lines of logs from existing tests, then it dumps a HUGE (~2000-8000 lines) XML content from the Gmail page into the log, and then it fails out each level of testing.
The 2 primary functions I'm trying to handle are:
- Get email contents based on the subject
- Click the link generated, which is stored in an email message
First off, is there a way to work around the error in Test Studio? Most of the time it works properly, so I'm not sure how to troubleshoot the intermittent failure.
Secondly, is there a better way than XPath to try and locate page elements in Gmail? (Eventually the dev team will implement other ways of handling the email contents, but that will be months down the road.)
I don't have logs at the moment; I will save them the next time I see a failure.
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?