Wednesday, November 19, 2014
On 1:00 AM by Unknown No comments
Answer 81: Ajax operations don’t reload a page like normal form submission
but they make http requests behind the scene. You cannot use
waitForPageToLoad for such operations and instead should use conditional wait
for change in state of application. This could as well mean waiting for
presence of an element before continuing with test operations.
Consider following
example in which type operation triggers Ajax operation which is followed by
conditional wait for presence of a text box –
// type operation brings
element “q” on screen without loading the page
selenium.type("elementLocator", "testData");
// conditional wait for
element “q”
for (int second
= 0;; second++) {
if (second >=
60) fail("timeout");
try { if (selenium.isElementPresent("q")) break;
} catch (Exception e) {}
Thread.sleep(1000);
}
Answer 82: If you are using Firefox then you can use “type” command to type
in a File Input box of upload file. But type operation does not work with IE
and you would have to use “Robot” class in java to work make file upload work.
Answer 83: The primary reason of permission denied error is same origin
policy restriction from java script. To overcome this error you can use
browsers with elevated security privileges. In case of Firefox you should use
*chrome and in case of IE you should use *iehta as browser for working with
Selenium.
Subscribe to:
Post Comments (Atom)
Search
Popular Posts
-
Sample Selenium IDE Test Script by Recording: We will use the Mercury Tours website as our web application under test. It is an online flig...
-
Locating GUI Elements Locating elements in WebDriver is done by using the “findElement(By. locator ())” method. The “locator” part of the co...
-
Selenium Commands – Selenese Selenese commands can have up to a maximum of two parameters: target and value. Parameters are not required al...
-
Answer 75 : If you want to see all options available while starting Selenium server then you should use option “-h” while starting Seleni...
-
Answer 44 : You can change default behavior of Selenium IDE > element locator preference by crating JS file with following– Locato...
-
Answer 24 : CSS location strategy can be used with Selenium to locate elements, it works using cascade style sheet location methods in wh...
-
Answer 54 : Selenium core is the core JS engine of Selenium which executes tests on browser, but because of same origin policy it needs t...
-
Answer 69 : You can use Selenium RC on any system which is capable I running Java. Hence you can use Selenium RC on MAC and UNIX machines...
-
Answer 34 : This is because Selenium IDE does not support execution of test in any other language than Selenese (language of Selenium IDE...
-
Answer 63 : Yes you can instruct Selenium Server to launch just one window. To do so you must specify – singleWindow while starting the ...
Shaik. Powered by Blogger.
0 comments:
Post a Comment