forked from robotframework/SeleniumLibrary
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial test files for Selenium 2 implicitly_wait functionality.
- Loading branch information
Showing
3 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
*** Settings *** | ||
#Test Setup Go To Page "javascript/dynamic.html" | ||
#Test Setup Go To Page "javascript/dynamic_timeout.html?timeout=4000" | ||
Resource ../resource.txt | ||
|
||
*** Test Cases *** | ||
Implicit Wait 10 seconds For 4000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 10 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=4000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0.5 seconds For 4000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0.5 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=4000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0 seconds For 4000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=4000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 10 seconds For 6000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 10 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=6000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0.5 seconds For 6000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0.5 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=6000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0 seconds For 6000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=6000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 10 seconds For 10000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 10 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=10000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0.5 seconds For 10000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0.5 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=10000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
Implicit Wait 0 seconds For 10000 Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0 seconds | ||
Go To Page "javascript/dynamic_timeout.html?timeout=10000" | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
Click Element adder | ||
Page Should Not Contain Element css=html body div#box0.redbox | ||
|
||
No Element | ||
Set Selenium Speed 0 seconds | ||
Set Selenium Timeout 0 seconds | ||
Set Selenium Implicit Wait 0 seconds | ||
Page Should Not Contain Element css=html body div#box0.redbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script type="text/javascript"> | ||
var next = 0; | ||
|
||
function addMore() { | ||
var box = document.createElement('DIV'); | ||
box.id = 'box' + next++; | ||
box.className = 'redbox'; | ||
box.style.width = '150px'; | ||
box.style.height = '150px'; | ||
box.style.backgroundColor = 'red'; | ||
box.style.border = '1px solid black'; | ||
box.style.margin = '5px'; | ||
|
||
window.setTimeout(function() { | ||
document.body.appendChild(box); | ||
}, 10000); | ||
} | ||
|
||
function reveal() { | ||
var elem = document.getElementById('revealed'); | ||
window.setTimeout(function() { | ||
elem.style.display = ''; | ||
}, 10000); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<input id="adder" type="button" value="Add a box!" onclick="addMore()"/> | ||
|
||
<input id="reveal" type="button" value="Reveal a new input" onclick="reveal();" /> | ||
|
||
<input id="revealed" style="display:none;" /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script type="text/javascript"> | ||
var next = 0; | ||
|
||
function getUrlVars() { | ||
var vars = {}; | ||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { | ||
vars[key] = value; | ||
}); | ||
return vars; | ||
} | ||
|
||
function addMore() { | ||
var box = document.createElement('DIV'); | ||
var timeout = getUrlVars()["timeout"]; | ||
box.id = 'box' + next++; | ||
box.className = 'redbox'; | ||
box.style.width = '150px'; | ||
box.style.height = '150px'; | ||
box.style.backgroundColor = 'red'; | ||
box.style.border = '1px solid black'; | ||
box.style.margin = '5px'; | ||
|
||
window.setTimeout(function() { | ||
document.body.appendChild(box); | ||
}, timeout); | ||
} | ||
|
||
function reveal() { | ||
var elem = document.getElementById('revealed'); | ||
window.setTimeout(function() { | ||
elem.style.display = ''; | ||
}, 10000); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<input id="adder" type="button" value="Add a box!" onclick="addMore()"/> | ||
|
||
<input id="reveal" type="button" value="Reveal a new input" onclick="reveal();" /> | ||
|
||
<input id="revealed" style="display:none;" /> | ||
</body> | ||
</html> |