# Navigation Functions

<meta charset="UTF-8" id="bkmrk-"></meta><title id="bkmrk-navigation-functions">Navigation Functions - Appvance Test Designer JS Commands</title><style id="bkmrk-body-%7B-font-family%3A-">
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 900px; margin: 0 auto; padding: 20px; line-height: 1.6; }
h1 { color: #1a73e8; border-bottom: 2px solid #1a73e8; padding-bottom: 8px; }
h3 { color: #333; margin-top: 24px; }
code { background: #f0f0f0; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
pre { background: #f5f5f5; padding: 12px; border-radius: 4px; overflow-x: auto; }
blockquote { background: #f9f9f9; border-left: 4px solid #1a73e8; margin: 12px 0; padding: 8px 16px; }
p.note { background: #fff3cd; border-left: 4px solid #ffc107; padding: 8px 16px; }
</style></head><body>### \_disableMainFrame = disableMainFrame 

<span>Parameters:value</span>   
Description: disables main /parent page and selects the subframe inside the main frame  
Example:

> `disableMainFrame();`

### \_navigateTo = navigateTo

Parameters: URL  
Description: <span style="color: rgb(0,0,0);">loads the given URL in the top frame of the window. To load in a popup window, use \_selectWindow to select that window first. </span>  
Example:

> `navigateTo("`http://localhost:8080/UI/index.html`");`

### \_navigateToOrGet = navigateToOrGet

Parameters: URL  
Description: <span style="color: rgb(0,0,0);">loads the given host in the URL and then executes a GET HTTP call to the provided URL.</span>  
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 site`  
> `prepareDomain("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: <span>boolean</span>  
Description: This causes the logging of the actions to stop or start. Does not affect the log action. Used together with <span>startAction</span>.  
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://f`acebook.com");`  
> `startStep("Starting login")`  
> `setValue(texbox("email"),"abc@example.com");`  
> `setValue(textbox("password"),"acb12341!");`  
> `submit(button("login"));`  
> `setSilenceAction(false);`