Professional Documents
Culture Documents
Selenium
Selenium
Selenium
Answer: the subsequent syntax are often accustomed launch the Browser:
Answer:
JXL supports the “.xls” format i.e. binary-based format. JXL doesn’t support stand
out 2007 and “.xlsx” format i.e. XML based mostly on the format
The JXL documentation isn’t as comprehensive as that of dish
JXL API doesn’t support wealthy text format
JXL API is quicker than dish API
Answer: The Data-Driven check style framework follows a style paradigm wherever
check logic is fastened however varies the check information. the info itself is
often in numerous repositories sort of a straightforward .csv file, .json file
or .xls sheet, or information, and might add the checks just change those external
files or decibel (instead of putting in test code itself).
Answer: Object Repository could be a term accustomed discuss with the gathering of
internet components happiness to Application underneath check (AUT) in conjunction
with their surveyor values. Thus, whenever the part is needed at intervals the
script, the surveyor worth are often inhabited from the article Repository. Object
Repository is employed to store locators in a very centralized location rather than
arduous committal to writing them at intervals the scripts.
In chemical elements, objects are often held on in Associate in Nursing stand-out
sheet that may be inhabited within the script whenever needed.
That’s all for currently.
Hope during this article you’ll realize answers to the foremost commonly asked
chemical element and WebDriver Interview queries. The answers provided here are
useful for understanding the chemical element basics and advanced WebDriver topics.
Do you have any chemical element Interview queries that aren’t answered here?
Please allow us to apprehend within the comments below and that we can try and
answer all.
9. make a case for, however, you’ll be able to capture server-side log chemical
element Server?
11. what’s the distinction between realizeElement () and find components ()?
Answer: each of them lets the user realize components within the current website
matching the desired surveyor worth. however if you utilize realize Element(),
solely the primary matching part would be fetched.
12. will we tend to use atomic number 34 RC for tests driving on 2 totally
different browsers on one software while not atomic number 34 Grid?
Answer: we will couple if the JAVA testing framework isn’t used. If we tend to use
the Java consumer driver of atomic number 34, rather than employing a Java testing
framework, TestNG permits the United States to not use atomic number 34 Grid.
Answer: IntelliJ is an associate degree IDE that helps users to write down code for
atomic number 34 higher and quicker. It might be used as an associate degree choice
for Java bean and Eclipse.
Answer: take a look at the knowledge that will with efficiency be browsed from
surpassing victimization JXL or dish API. See the elaborated tutorial here.
Answer: There square measure four ways of effective Web-based pop-up handling:
string getText() methodology returns the text displayed on the alert box (Company)
void accept() methodology clicks on the “Ok” button as before long because the pop-
up window seems
void dismiss() methodology clicks on the “Cancel” button as before long because the
pop-up window seems
void sendKeys(String stringToSend) methodology enters the desired string pattern
into the alert box.
16. that net driver implementation is that the fastest?
Answer: The quickest net Driver is HTML Unit Driver. Differing from different
drivers (Firefox Driver, Chrome Driver, etc), it’s non-GUI, whereas running no
browser gets launched.
Answer: “Find Button” of atomic number 34 IDE is employed to check the surveyor.
Clicking on this button, you’ll see on-screen if your component surveyor is correct
or wrong.
Also, you’ll use the “FirePath” plugin in Firefox.
Answer: use click() or submit() ways square measure used for entering. But, don’t
forget that the submit() methodology is employed on the condition that type=’
submit’.
You can use Actions nonpareil.sendKeys(Keys. ENTER) for TAB.
Answer: mythical being permits the online page to retrieve little amounts of
information from the server while not reloading the complete page.
The different wait ways ought to be applied for testing the mythical being
application:
Thread Sleep
Implicit Wait
Explicit Wait
WebdriverWait
Fluent Wait
21. may you justify the road of code Webdriver driver = new FirefoxDriver()?
Answer: submit() methodology might be used because the alternate thanks to click on
the login button, however on condition that attributes type=submit. ( tableau
online training )
Answer: testng.xml file is employed to put together the total check suite. Here we
will produce a check suite, produce check teams, mark tests for parallel execution,
add listeners and pass parameters to check scripts. They are often used for the
additional check suite triggering.
Answer: Exceptions area unit events because that java program end suddenly while
not giving expected output. Java provides a framework wherever a user will handle
exceptions.
One of the necessary intentions of exception handling is to stop this break and
continue program execution. Sometimes, you would possibly need to perform some
series of actions on occurring of an exact exception.
When Associate in Nursing exception happens, Associate in Nursing exception object
is formed that is technically cited as ‘Throwing Associate in Nursing Exception’
and that we add Try/Catch blocks like,
try that may throw Associate in Nursing exception is value-added within the strive
block.
once no exception is thrown, the strive statement is dead and not the catch
statement.
For example: once the element script fails because of the incorrect surveyor, then
the developer ought to be ready to perceive the explanation for failure and this
may be achieved simply if the exception is handled properly within the program.
In my expertise, it’s best to undertake to avoid WebDriver exceptions whenever
attainable and catch actually exceptional cases. Use try/catch to handle things
that get it wrong and area unit outside my management. ( Hadoop online training)
25. does one recognize how to refresh the browser by mistreatment Selenium?
Answer:
navigate().refresh()
getCurrentUrl()
navigate().to(driver.getCurrentUrl())
sendKeys(Keys.F5)
30. what’s the distinction between @Factory and @Data supplier annotation?
Answer: @DataProvider cares about individual check strategies and runs the precise
strategies for several times. @Factory technique creates check category instances
and runs all the check strategies therein category with completely different
information. sets.
33. a way to login to any website if it’s showing any authentication popup for
username and password?
Answer: you must pass the username and secret with URL:
36. however are you able to handle network latency mistreatment Selenium?
Answer:
You can use driver.manage().timeouts().pageLoadTimeout(); for network latency.
37. what’s the distinction between drivers. close() and driver. quit command?
Answer: Object repository is an important entity in any UI automation that permits
a checker to store all objects that may be utilized in the scripts in one or a lot
of centralized locations instead of scattered everywhere the test scripts.
39. however, will we discover the worth of various attributes like name, class, the
worth of AN element?
Answer: exploitation getAttribute(“”) methodology we will notice the worth of
various attrbutes of a part e.g.-
String valueAttribute =
driver.findElement(By.id(“elementLocator”)).getAttribute(“value”);
WebElement component =
wait.until(ExpectedConditions.elementToBeClickable(By.id(“elementId”);
43. What are some expected conditions which will be employed in express waits?
Answer: a number of the ordinarily used expected conditions of a part which will be
used with expicit waits are-
elementToBeClickable(WebElement component or By locator)
stalenessOf(WebElement element)
visibilityOf(WebElement element)
visibilityOfElementLocated(By locator)
invisibilityOfElementLocated(By locator)
attributeContains(WebElement component, String attribute, String value)
alertIsPresent()
titleContains(String title)
titleIs(String title)
textToBePresentInElementLocated(By, String)