Possible to clear the LINQPad results window with code? - linqpad

Using LINQPad, using the extension method Dump(), Console.WriteLine or Debug.Writeline, the values will appear in the results window.
Is there a way to clear this results window during the run of a linqpad script? As an example, I tried Console.Clear() however this throws an exception

I've added a feature to do this
Util.ClearResults();

Related

Is there any way to change focus of browser tabs in robot?

I am using robot framework+python+selenium to create an automation framework.
I am stuck at this point.
On this website. When the link 'a' is clicked, a new tab is opened. On this new new I want to test functionality. My problem is I'm not sure how to change the focus from one tab to another. I tried the switch browser keyword as well as the select window keyword. No luck.
You can make use of the following code change focus of the windows using selenium2Library.
#{windows_num} = List Windows
${nWindows} = Get Length ${windows_num}
${latest_window} = Evaluate ${nWindows}-1
Select Window #{windows_num}[${latest_window}]
Found a simple solution here, that worked for me:
https://www.youtube.com/watch?v=5tVgC-oQVKs

How to allow code to run only if a window with specific window title does not exist?

I have program that acts as a GUI frontend for a CLI program. I can set custom titles for the CMD windows that open (up to 4), but despite looking at other answers to similar questions, I can't piece together the code to check through the array for the specific window titles. Could someone help me out with an example?
EDIT: Including other questions.
how to get the window title of a process using vb.net
VB.NET Get Process list and kill process
Found a simple answer - you can use AppActivate() and checking the error numbers to check if the window title exists.

Debugging - Finding where Error statement in log is coming from [duplicate]

I'm not sure if this is possible. Here is an example situation:
Something is printing to my console and I don't know where it is coming from in the code. I did a quick search using the Finder in Xcode on terms such as 'NSLog' and 'print'. Nothing relevant came up.
Is there any quick way that Xcode has of finding where the source of the output is coming from ?
Kind of like when you right click on a method and you have all the options of exploring different parts of the code associated with that method.
Also: are there other functions that print besides NSLog and print?
Thanks so much!
Try running in the debugger, with breakpoints set on printf, NSLog, etc. When you hit a breakpoint do a backtrace (bt) to see where it's being called from
There's a plugin LinkedLog for that. You replace all NSLogs with LLogs and then will be able to just tap on link in Xcode's console to get to the line caused it to appear.
Didn't try it myself, but definitely will.

Attribute Error: On selenium-python script

I am using Selenium-python script for web test automation. When ever I use selenium inbuilt commands, I will get Attribute error during run time.
Ex: selenium.WindowFocus("preview_email") throws "AttributeError: class selenium has no attribute 'WindowFocus'"
I am new to test automation. Help me to sort out this problem.
The command that you are looking for is selenium.window_focus()
I have never used the Python client personally, but a quick glance at the selenium.py file reveals that there is a window_focus command which gives the currently "selected" window focus ("selected" in Selenium terms is the window that Selenium is currently executing commands against and not necessarially the window that has user focus).
Executing the select_window command with a window ID will set tell Selenium which window you want to execute commands against.
I have had some trouble w/ popups in general and the way the Selenium IDE and RC clients attempt to locate new windows and/or there parents. Good luck.
I think you want to force web-driver to go to another window with name "preview_email".
For this purpose, you need to use selenium.switch_to_window("preview_email"); because selenium.window_focus() just gives focus to the currently selected window and accepts no arguments. Additionally you used it in JAVA mode (I mean selenium.windowFocus()).

QTP_errObject CaptureBitmap

May I request you to clarify the issue I have with QTP err object.
I am trying to capture the screen shot of an object on which error occured.
I use the code object.captureBitmap(filename) to achieve this.
I would like to know if it is possible to get the screen shot of the entire page with the err object higlighted.
You can get this in your results file. go to tools->options and select the run tab. Check the box "Save still image captures to results" and select either always or for errors. When you run your test it will show the full screen and highlight the object it has a problem with, if it could find it.
(if I'm not too late with my reply)
Use CaptureBitmap method for both problem object and parent of the object.
Then you can display it in a variety of ways using simple html page automatically generated.
Albert