Warning: fopen(/tmp/SghXTngBZPli-iYHdwm.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139
Warning: unlink(/tmp/SghXTngBZPli-iYHdwm.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
In this post, we will discuss working with different advanced features of browserwindow class in Coded UI Testing.Using BrowserWindow class of Coded UI testing we can perform some of the most common and useful operations such as
Clearing Cache
Clearing Cookies
Executing scripts
Capturing screenshots
Working with existing browser session etc
Working with Existing browser session
There are many situations were, we might need to work with existing opened browsers, this can be done very easily using Locate() method available with BrowserWindow class of coded UI Testing.
NoteIn Selenium WebDriver, working with existing session is not possible till now, which is still a feature request by many but still in vein, which you can read from here. But the same is possible with RemoteWebDriver and that too supports only FireFox browser !!!
We can also user CurrentBrowser property of BrowserWindow class to set the browser we are working, this can be helpful while working with cross browser testing to enable working with different browsers like Firefox and Chrome.
You can watch the complete video from the video below
Thanks for watching the video and reading the article !!!
Please leave your comments and let me know if there is anything need to be improved in the article.
Thanks,
Karthik KK
Post Author:
Karthik kk
4 Replies to “Exploring features of Browser in CUIT”
Dear Karthik,
In Selenium, working with the existing session is possible.(only for firefox) You can use RemoteWebDriver Class to use the already opened FireFox Browser. For detail description, see my blog post about this
Here small doubt Capturing the image at what time its exactly capturing? I mean that after completing the tests? but here I observed in middle of the test its capturing if its capturing after completion of the test Initial text box we are passing KK string right that is not captured in the image why?
Dear Karthik,
In Selenium, working with the existing session is possible.(only for firefox) You can use RemoteWebDriver Class to use the already opened FireFox Browser. For detail description, see my blog post about this
http://binaryclips.com/uncategorized/selenium-web-driver-in-c-how-to-continue-script-on-the-already-opened-browser-instance/
True, this is possible only with RemoteWebDriver class, but not with WebDriver of Selenium, you brought the right point !!!
I will update my post.
Thanks,
Karthik KK
Hi Karthik,
Here small doubt Capturing the image at what time its exactly capturing? I mean that after completing the tests? but here I observed in middle of the test its capturing if its capturing after completion of the test Initial text box we are passing KK string right that is not captured in the image why?
I think in video I mentioned that the screenshot will be captured if there is any exception in your code.
Thanks,
Karthik KK