- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 455 Articles for Software Testing
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
2K+ Views
We can maximize and minimize the browser while we are testing an application in Selenium.For maximizing the browser, maximize() method is to be used.For minimizing the browser, minimize() method is to be used.Both these methods can be used simultaneously in the same program.ExampleCode Implementationfrom selenium import webdriver #browser exposes an executable file #Through Selenium test we will invoke the executable file which will then #invoke actual browser driver = webdriver.Firefox(executable_path="C:\geckodriver.exe") # to maximize the browser window driver.maximize_window() #get method to launch the URL driver.get("https://www.tutorialspoint.com/index.htm") #to refresh the browser driver.refresh() # to minimize the browser window driver.minimize_window() #to close the browser ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
878 Views
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package.For invoking the internet explorer browser, we have to select the Ie class. Then create the driver object of that class. This is the most important and mandatory step for browser invocation.Every internet explorer browser gives an executable file. Through Selenium we need to invoke this executable file which is responsible for invoking the actual chrome browser.Next we need ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
3K+ Views
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package.For invoking the Firefox browser, we have to select the Firefox class. Then create the driver object of that class. This is the most important and mandatory step for browser invocation.Every firefox browser gives an executable file. Through Selenium we need to invoke this executable file which is responsible for invoking the actual chrome browser.Next we need to download ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
13K+ Views
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package.For invoking chrome browser, we have to select the Chrome class. Then create the driver object of that class. This is the most important and mandatory step for browser invocation.Every chrome browser gives an executable file. Through Selenium we need to invoke this executable file which is responsible for invoking the actual chrome browser.Next we need to download the ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
701 Views
We can locate and identify multiple elements at the same time in Selenium. There are various strategies to locate the elements. The different ways of locating elements are listed below −find_elements_by_xpath – This method returns all the elements with matching xpath in the argument in form a list. It shall return an empty list if no element has the matching xpath.Syntaxdriver.find_elements_by_xpath("//input[name='text-search']")find_elements_by_link_text – This method returns all the elements with matching value of link text in the argument to form a list. It shall return an empty list if no element has the matching text.Syntaxdriver.find_elements_by_link_text("Tutorialspoint")find_elements_by_name – This method returns all the ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
11K+ Views
The differences between implicit and explicit wait are listed below −Implicit WaitExplicit Wait1The driver is asked to wait for a specific amount of time for the element to be available on the DOM of the page.The driver is asked to wait till a certain condition is satisfied.2It is a global wait and applied to all elements on the webpage.It is not a global wait and applied to a particular scenario.3It does not require you to meet any condition.It is required to satisfy a particular condition. Some of the expected conditions include −title_containsvisibility_of_element_locatedpresence_of_element_locatedtitle_isvisibility_ofelement_selection_state_to_bepresence_of_all_elements_locatedelement_located_to_be_selectedalert_is_presentelement_located_selection_state_to_b estaleness_ofelement_to_be_clickableinvisibility_of_element_locatedframe_to_be_available_and_switch_to _ittext_to_be_present_in_element_valuetext_to_be_present_in_elementelement_to_be_selected4Syntaxdriver.implicitly_wait(2)Syntaxw = WebDriverWait(driver, 7) w.until(expected_conditions.presence_of_ele ment_located((By.ID, "Tutorialspoint")))5It ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
2K+ Views
While working with Selenium, there may be situations when we see that after page load action by the browser, the web elements are getting loaded at various intervals of time.This type of situation leads to syncing problems between Selenium and the web element on the page. The identification of elements does not happen due to the absence of that element in DOM. The exception like ElementNotVisibleException is thrown due to this.The wait concept in Selenium overcomes this problem and gives a delay between elements identification and actions performed on them. The explicit wait is applied not to all but to ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
2K+ Views
While working with Selenium, there may be situations when we see that after page load action by the browser, the web elements are getting loaded at various intervals of time.This type of situation leads to syncing problems between Selenium and the web element on the page. The identification of elements does not happen due to the absence of that element in DOM. The exception like ElementNotVisibleException is thrown due to this.The wait concept in Selenium overcomes this problem and gives a delay between elements identification and actions performed on them. An implicit wait can be considered as default waiting time ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
378 Views
While working with Selenium, there may be situations when we see that after page load action by the browser, the web elements are getting loaded at various intervals of time.This type of situation leads to syncing problems between Selenium and the web element on the page. The identification of elements does not happen due to the absence of that element in DOM. The exception like ElementNotVisibleException is thrown due to this.The wait concept in Selenium overcomes this problem and gives a delay between elements identification and actions performed on them. Selenium web driver supports mainly two types of waits −Implicit ... Read More
![Debomita Bhattacharjee](https://www.tutorialspoint.com/assets/profiles/210947/profile/60_171666-1594382095.jpg)
869 Views
We can refresh a page and then navigate to a new page from the current page with Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript.Syntaxdriver.execute_script('history.go[0]') javaS = "window.location = 'https://www.tutorialspoint.com/index.htm'" driver. execute_script(javaS)There are couple of methods of working with Javascript −Javascript execution at document root level.In this process, we shall identify the element with locators (class or id) and then perform the required action on it. Then execute_script() method is called and the Javascript is passed as a string to ... Read More