Navigation Functions
_disableMainFrame = disableMainFrame
Parameters:value
Description: disables main /parent page and selects the subframe inside the main frame
Example:
disableMainFrame();
_navigateTo = navigateTo
Parameters: URL
Description: loads the given URL in the top frame of the window. To load in a popup window, use _selectWindow to select that window first.
Example:
navigateTo("http://localhost:8080/UI/index.html");
_navigateToOrGet = navigateToOrGet
Parameters: URL
Description: loads the given host in the URL and then executes a GET HTTP call to the provided URL.
Example:
navigateToOrGet("https://www.synopsys.com/content/dam/synopsys/optical/pdf/RSoft-Choosing-Right-Photonic-System-Design-Software.pdf");
_prepareDomain = prepareDomain = _setDomain = _prepareDomain
Parameters: value
Description: DS3 prepares itself with any other external domain apart from the application domain to carry out actions in that.
Example:
prepareDomain("www.externaldomain.com"); //You can give any domain name thats external to current application whcih is under test.prepareDomain("https://www.southwest.com"); // main siteprepareDomain("https://www.southwesthotels.com") // external domain.
_processScript = processScript
Parameters: script, method
Description: executes a given javascript file.
Example:
processScript("test/com/appvance/ds/api/Imported.js","js");
_setDomain = setDomain;
Parameters: value
Description: DS3 prepares itself with any other external domain apart from the application domain to carry out actions in that.
Both prepareDomain and setDomain are the same.
_selectFrame = selectFrame
Description: Used to restrict proxy commands to only iFrames that match the parameter. The string parameters check if the iframe id, href, class or text contains the provided parameter. See also selectMainFrame.
Example:
selectFrame("secondFrame"); //can select the frame by id,class,title,href,etc..
_selectMainFrame = selectMainFrame
Parameters:value
Description: Selects the Main DS3 Frame:
Example:
navigateTo("http://sahitest.com/demo/iframesTest.htm");log(getIframesInfo());selectFrame("[1]");click(link("linkTest.htm"));selectMainFrame();click("Click me");
_selectWindow = selectWindow
Parameters: value
Description: Selects a window with title given to be current one.
Example:
navigateTo("http://sahitest.com/demo/iframesTest.htm");log(getIframesInfo());selectFrame("[1]");click(link("linkTest.htm"));selectMainFrame();click("Click me");
_setSilenceAction = setSilenceAction
Parameters: boolean
Description: This causes the logging of the actions to stop or start. Does not affect the log action. Used together with startAction.
Example:
setSilenceAction(true);navigateTo("http://www.sahitest.com");startStep("My custom step name");click(link("/demo"));setSilenceAction(false);click(link("a x[1]"));
_startStep = startStep
Parameters: step name
Description: This causes the log of a step with the given custom name. Used together with setSilenceAction.
See Also: setSilenceAction
Example:
setSilenceAction(true);navigateTo("http://facebook.com");startStep("Starting login")setValue(texbox("email"),"abc@example.com");setValue(textbox("password"),"acb12341!");submit(button("login"));setSilenceAction(false);