Automation Testing Articles

Page 56 of 62

How to invoke the Firefox browser in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 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

How to invoke the Chrome browser in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 14K+ 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

How to identify multiple elements at the same time in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Jul-2020 884 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

What are the various waits available in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Jul-2020 539 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

How to refresh a browser then navigate to a new page with Javascript executor in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Jul-2020 1K+ 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

How to perform vertical scrolling of a webpage with Javascript executor in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Jul-2020 607 Views

We can perform vertical scrolling of a webpage 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("window.scrollTo(0, document.body.scrollHeight);")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 it.Syntaxjavas = "document.getElementsByName('user-search')[0].click();" driver.execute_script(javas)Please note, we have used getElementsByName('user-search')[0]. The functions like getElementsByName and ...

Read More

What are different selenium versions?

Adiya Dua
Adiya Dua
Updated on 06-Jul-2020 2K+ Views

Selenium 1 or known as RC (Remote Control) and Web Driver differ in many aspects but the key difference comes in the implementation layer or in simple words the architecture of both of them.As name suggest, RC is a Remote Control which works by taking the remote of the browser and then injects the automation code to be tested by injecting the custom scripts written.The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-built features to trigger the automation test written by tester. Web driver is the successor of Remote Control.The architecture of Selenium ...

Read More

What is the difference between selenium and automation?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 2K+ Views

Automation − It is the technique to run the test cases without human intervention. If we are sticking to the IT industry, Automation is not just confined to Automation of test scripts. Automation is the basic control system in which human intervention is expected the least. Various many tasks such as Data Migration, Decision making for AI, deploying the code automatically in the latest builds for testing etc.Goals −The ultimate goal of Automation is to re-run the regression flows without intervention of manual tester. Initializing some amount of human effort is required to design the scripts. But the end result ...

Read More

What is Maven in selenium?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 3K+ Views

Maven is Yiddish Word which means Accumulator of Knowledge. Maven is a tool which is used for building and managing Java Based Projects. Basically to put it in simple words is a way to manage dependency for Java Based Project. Maven can be used when building project with POM (Page Object Model) when working on big projects.Below are the objectives which can be achieved with maven −Easier and Uniform build process.Providing quality project informationEasy DocmentationBest practices developmentManage the dependenciesLets understand them one by oneEasier and Unfirom Build Process −Maven provides pom.xml configuration files where all information such as construction directory, ...

Read More

Which is the selenium latest version?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 528 Views

Selenium started with version 1 and now version 3 is the currently the latest released version available in the market. Let’s has a comparative study of the different features of each of the version.Selenium 1 or RC: As name suggest, RC is a Remote Control which works by taking the remote of the browser and then injects the automation code to be tested by injecting the custom scripts written.Selenium 2 or Web driver: The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-built features to trigger the automation test written by tester. Web driver ...

Read More
Showing 551–560 of 618 articles
« Prev 1 54 55 56 57 58 62 Next »
Advertisements