Hello,
I have a test that I need to run against Chrome & Firefox. I created WebTest which I need to run and I am using that WebTest as Step in other test as per TestSteps.png. When I execute this test it fails while preparing Chrome for automation. (Chrome.jpg) I have attached the error log as well.
Same thing happens for Firefox.
I have configured my browsers as per instruction given for Chrome and Firefox
Let me know if more information is required.
Thanks,
Chandresh
14 Answers, 1 is accepted
Hi Boyan,
Thanks for the update. I installed the latest version (528) and normal record & execute works fine for Firefox & Chrome.
However; I want to execute a test in below manner.
Steps:
1. Start execution of a test in Internet Explore. (WebTest2)
2. Open Chrome & execute an another Test (WebTest1) as Teststep in Chrome from here.
3. Open Firefox & execute an another Test (WebTest1) as Teststep in Firefox from here.
It fails after opening Chrome browser and gives same TimeOut exception which I mentioned earlier. Is there something I am missing here ?
I have attached my DemoProject for reference.
Thanks,
Chandresh
It is not possible the same test to be executed with 3 browsers successively. The best way to proceed is to add them in a test list and have the test list executed. Here is short video demonstration.
I am returning the project.
Regards,
Ivaylo
Telerik
Thanks Ivaylo. I got bit busy so could not reply.
So there is only one way to execute a test in three browser successively and it is by create three different WebTests. Correct me if I am wrong.
Also, can you help me with below issue I am facing with my Test List ?
I have a global function for Login under Utility Class. I have create two different Web Tests in which I am using this Login function. Now when I execute each test individually it works fine. But when I add them to Test List and run that List, first test gets executed successfully, however; it doesn't execute Login function for second test.
I have attached my Demo Project. You can run "List 1" test list to see the problem.
Let me know if you want me to create a separate thread for this.
Thanks,
Chandresh
Yes it is a good practice to submit new issues in new tickets. Please proceed that way next time.
Regarding the behavior the easier way to proceed is to create a sample login test and use it as a test as step in both tests.
Regards,
Ivaylo
Telerik
Thanks Ivaylo. I'll follow that.
As for the issue, I can't use Test As Step feature as I have role based users and I need to login with different users for each test. So is there any other way around that I can resolve this ?
Thanks,
Chandresh
We need some more time investigating this problem.
Thank you for your patience.
Regards,
Ivaylo
Telerik
Hello Ivaylo,
Sure, no problem.
Thanks,
Chandresh
We have found the reason why this is failing, this is because the manager is recreated on each run, so in order to overcome this problem whenever you have the following code:
if
(_pages ==
null
)
{
​
_pages =
new
Pages(Manager.Current);
}
return
_pages;
You should change it to:
//if (_pages == null)
//{
_pages =
new
Pages(Manager.Current);
//}
return
_pages;
Thank you for your patience and understanding.
Regards,
Ivaylo
Telerik
Thanks Ivaylo. It works now! :)
However; I am still wondering why it was recreating manager even if it is exist ?
Thanks,
Chandresh
I am very happy to hear that it works now.
It happens because we are killing the manager after the first execution so you need create it again.
Let me know if you need further assistance.
Regards,
Boyan Boev
Telerik
Hi Boyan,
Sure, thanks a lot! :)
Thanks,
Chandresh
I am closing this case now.
Regards,
Ivaylo
Telerik