Update cs-wd.js

added waitForPopup function to C#

added mainWindow variable to C# because I've noticed the main window doesn't always stay an index 0.

fixed WDAPI.Element.prototype.select

added a function to fix javascript stuff.

added:
contextMenu
switchWindow
selectPopup
switchFrame
SelectedOption
location
getElementPositionTop
MoveToElement
mouseDown
mouseUp
dragAndDrop
isEditable
doubleClick
keyPress
dragAndDropOffset