In this tutorial, I will tell you how to delete cookies -
1. We need to create an object of cookie and pass the cookie name and value to the cookie's constructor as an argument.
2. Add cookie using selenium webdriver.
3. Now delete cookies using selenium webdriver.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot = "7087636712";
google_ad_width = 336;
google_ad_height...
Wednesday, November 12, 2014
November 12, 2014 by GudReview

In this tutorial, I will tell you how to add cookie -
1. We need to create an object of cookie and pass the cookie name and value to the cookie's constructor as an argument.
2. Now add cookie using selenium webdriver.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot = "7087636712";
...
November 12, 2014 by GudReview
A cookie is a small file stored on the client computer by the server. If the user requests a web page then the server uses cookie information to identify the user. With selenium, you can create, get and delete cookies.
1. Create cookie - There are several ways to create cookie.
a) Cookie name = new Cookie("cookieName", "cookieValue");
...
Tuesday, November 4, 2014
November 04, 2014 by GudReview
A JavaScript prompt box is used when you want the user to enter a value before going to a page.
When a prompt box pops up, the user will have to enter a value by using WebElement sendkeys("String str") methond and then click either "OK" or "Cancel" to proceed after entering an input value.
If the user clicks "OK" the prompt box will return the value. If the user clicks "Cancel" the box returns...
November 04, 2014 by GudReview
A JavaScript confirm popup box is used when you want the user to verify or accept something. In confirm box, the user can click either "OK" button or "Cancel" button to proceed.
If the user clicks on "OK" button, the confirm popup box will return true. If the user clicks on "Cancel" button, the confirm popup box will return false.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot...
November 04, 2014 by GudReview
A JavaScript alert box is used to provide some information to the user. Alert box provides only "OK" button. So, the user will have to click "OK" to proceed.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot = "7087636712";
google_ad_width = 336;
google_ad_height = 280;
JavaScript Alert Box
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.Alert;
import...
November 04, 2014 by GudReview
JavaScript alert, confirm and prompt popup is an web element. To handle JavaScript alert, confirm and prompt popup, Selenium comes with Alert interface.
Selenium Alert interface provides methods to
1. Click "OK" button
2. Click "Cancle" button
3. Get text from popup boxes
4. Enter text to popup boxes
Alert Interface & It's Methods
google_ad_client = "ca-pub-8489590936844748";
...
November 04, 2014 by GudReview
Frames is a web page within another web page. A web page can have one or more frames.
Each frame has its own unique numeric id and name. Selenium WebDriver uses this unique id or name to switch control between frames.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot = "7087636712";
google_ad_width = 336;
google_ad_height = 280;
Syntax -
1. driver.switchTo().frame(int...
November 04, 2014 by GudReview
Web page may have multiple windows. Multiple windows means a link on a web page of another web page. Current web page is called main window and other windows called child window.
Each window has its own unique alphanumeric id. Selenium WebDriver uses this unique id to switch control between multiple windows.
google_ad_client = "ca-pub-8489590936844748";
google_ad_slot = "7087636712";
...
Subscribe to:
Posts (Atom)