Tuesday, June 4, 2013
Mouse right click for context menu
The below code right clicks on a link in a page named “Document” and selects “CreateDocument” in the context menu. Each option in the menu belongs to WebElement class.
'set the path to an object
Set pathObj = Browser(“objBrowserName”).Page(“objPageName”)
'Create an object of DeviceReplay class which helps us simulate mouse click operation
Set deviceReplay = CreateObject(“Mercury.DeviceReplay”)
'Get the X-axis value of the link
getX = pathObj.Link(“Document”).GetROProperty(“abs_x”)
'Get the Y-axis value of the link
getY = pathObj.Link(“Document”).GetROProperty(“abs_y”)
'Simulates the right click operation over the link
deviceReplay.MouseClick getX,getY,RIGHT_MOUSE_BUTTON
'Click on the “CreateDocument” option.
pathObj.WebElement(“name:=CreateDocument”).Click
Set deviceReplay = Nothing
AI Prompt - Compatibility Testing / mobile testing
AI Prompt "Propose compatibility test cases for [feature] across [browsers/devices/OS versions]. Include viewport/resolution, touch v...
-
Agile software development is a highly iterative and collaborative approach to software development that emphasizes flexibility and a...
-
Test-Driven Development (TDD) is a software development approach that emphasizes writing automated tests before writing the code. The appr...
-
Software development is a complex process that requires a high degree of accuracy, efficiency, and speed. One way to achieve these goals i...