0% found this document useful (0 votes)
12 views4 pages

Selenium Framework API Implementation Guide

The document outlines the requirements for implementing a custom framework that wraps the Selenium framework, specifying at least 30 APIs to be developed. Key functionalities include browser initialization, various wait methods, navigation, element interaction, and alert handling. The framework aims to enhance automation capabilities in web testing using Selenium.

Uploaded by

bodywakb91
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Selenium Framework API Implementation Guide

The document outlines the requirements for implementing a custom framework that wraps the Selenium framework, specifying at least 30 APIs to be developed. Key functionalities include browser initialization, various wait methods, navigation, element interaction, and alert handling. The framework aims to enhance automation capabilities in web testing using Selenium.

Uploaded by

bodywakb91
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Selenium Assignment

Build Your Framework

1
Implement your own Framework that Wraps Selenium Framework you should implement at
lease these 30 APIs and you are more than welcomed to implement more functionalities as you
see/need:

1. void initializeBrowser()
Initialize Chrome browser and maximize the window.

2. void implicitWait(int seconds)


Set implicit wait timeout for the WebDriver.

3. void explicitWait(By locator, int timeoutSeconds)


Explicitly wait for the presence of an element located by the given locator.

4. void fluentWait(By locator, int timeoutSeconds, int pollingMillis, String


timeoutMessage)
Fluent wait with configurable timeout, polling interval, and custom timeout message.

5. void navigateToURL(String url)


Navigate to the specified URL in the browser.

6. String getPageTitle()
Return the current page title.

7. String getCurrentURL()
Return the current page URL.

8. void click(By locator)


Click on an element after waiting for it to be clickable.

9. void rightClick(By locator)


Perform a right-click (context click) on an element.

10. void sendKeys(By locator, String text)


Send keys (text) to an element.

11. String getText(By locator)


Get visible text from an element.

12. void selectDropdownByVisibleText(By locator, String visibleText)


Select a dropdown option by visible text.

13. void selectDropdownByValue(By locator, String value)


Select a dropdown option by value attribute.

2
14. void selectDropdownByIndex(By locator, int index)
Select a dropdown option by index.

15. void dragAndDrop(By sourceLocator, By targetLocator)


Drag source element and drop it on target element.

16. void checkCheckbox(By locator)


Check a checkbox if not already checked.

17. void uncheckCheckbox(By locator)


Uncheck a checkbox if currently checked.

18. void selectRadioButton(By locator)


Select a radio button if not already selected.

19. void switchToWindowByTitle(String windowTitle)


Switch browser window focus to window with given title.

20. void switchToWindowByHandle(String windowHandle)


Switch browser window focus to window with given handle if it exists.

21. void closeCurrentWindow()


Close the currently focused window.

22. void navigateBack()


Navigate back in browser history.

23. void navigateForward()


Navigate forward in browser history.

24. void refreshPage()


Refresh the current page.

25. void scrollToElement(By locator)


Scroll viewport to bring the element into view using [Link]().

26. void acceptAlert()


Accept (click OK on) an active JavaScript alert.

27. void dismissAlert()


Dismiss (click Cancel on) an active JavaScript alert.

28. String getAlertText()


Get the text content of an active JavaScript alert.

3
29. void sendTextToAlert(String text)
Send text input to a prompt alert and accept it.

30. void closeBrowser()


Close the browser and quit the WebDriver session.

Thank You
Edges For Training Team

You might also like