close(): Close
the current window, quitting the browser if it's the last window currently
open.
quit(): Quits
this driver, closing every associated window.
Inspecting XPath
Expressions and CSS Selectors using Firefox/Chrome
XPath syntax: $x("")
CSS syntax: $$("")
Cachelookup
does is it stores elements having @cachelookup annotation applied over it and
then stores this element for further reference/s. What this annotation does is
it stores the value the searchBox element and now there is no need to search
for this element on webpage again.
For example:
public class SearchPage {
// The element is now looked up using the name attribute,
// and we never look it up once it has been used the first time
@FindBy(how = How.NAME, using = "q")
@CacheLookup
private WebElement searchBox;
public void searchFor(String text) {
//We continue using the element just as before
SearchBox.sendKeys(text);
SearchBox.submit();
Donate:Please Donate the some money (anything do you want) for my blog if you beneficial for this, I will provide more real example for the latest technique for whom who wants to make a carrier in IT field or solved some problem, My Name is – RITESH KUMAR SINGH A/C number- 913010044116345 AXIS Bank LTD :- Vaishali NCR, India-001
No comments:
Post a Comment