Examples on using Navigate
Written by: webDOMinator 2 years and 1 month ago
Here's a simple navigate command and how it's used in a script:
Code
navigateQuick Reference for "navigate"
Click on command to see examples & comments
Browser Level Commands
Usage: navigate:url
Description: Makes the browser navigate to the URL specified.:google.com
dom.input.q.value=webDOM
clickQuick Reference for "click"
Click on command to see examples & comments
DOM Level Commands
Usage: click:element
Description: Clicks a DOM element specified by element.:dom.input.btnG
Notice that the script navigates to google.com and then continues by searching for "webDOM"? It's important to note that the navigate command will make webDOM wait till the page has finished loading before continuing with the next line of code.
Here's an example of using a variable with navigate to navigate to the profile of the current User ID:
Code
navigateQuick Reference for "navigate"
Click on command to see examples & comments
Browser Level Commands
Usage: navigate:url
Description: Makes the browser navigate to the URL specified.:http://twitter.com/^
wd.curinfoQuick Reference for "wd.curinfo"
Click on command to see examples & comments
WebDOM Program Variables
Description: Returns the value of the currently selected User ID or item from the info list.
...
The
wd.curinfoQuick Reference for "wd.curinfo"
Click on command to see examples & comments
WebDOM Program Variables
Description: Returns the value of the currently selected User ID or item from the info list. variable represents the current User ID in the list. If the twitter plugin was open and a list was loaded with twitter user IDs, it would navigate to the currently selected user ID's profile.
it was said earlier that when navigating, it automatically waits for a page. This is just like performing a
pagewait command after a click on a link:
Code
navigateQuick Reference for "navigate"
Click on command to see examples & comments
Browser Level Commands
Usage: navigate:url
Description: Makes the browser navigate to the URL specified.:google.com
dom.input.q.value=webDOM
clickQuick Reference for "click"
Click on command to see examples & comments
DOM Level Commands
Usage: click:element
Description: Clicks a DOM element specified by element.:dom.input.btnG
pagewaitQuick Reference for "pagewait"
Click on command to see examples & comments
Script Level Commands
Usage: pagewait
Description: Makes the scripting engine wait until the next page finishes loading before carrying out the next command.
...
Navigate automatically waits for the page to load before continuing to the "dom.input.q" line of code just the same as the "pagewait" command under the "
clickQuick Reference for "click"
Click on command to see examples & comments
DOM Level Commands
Usage: click:element
Description: Clicks a DOM element specified by element.:" line of code waits for the next page to load after that button was clicked.