A lot of web applications these days allow users to drag and drop what they want where they want on the page. This is really nice from a usability point of view, but from a testability point it is a nightmare!
We can get around this with actions API.
Open up inteliij and create a new Selenium WebDriver project.
Create a new class and a new test with the following code:
Run the test. You should see this first:
And when it is complete you will see the block go blue:
What just happened?
We have just seen how easy it is to do a drag and drop on the page. We just need to create an Actions object and then create a chain of events. When we have built up the chain we call build(). This puts everything in the right order and when we call perform(), the items are popped out of the queue and run in order.
Let us have a look at doing some slightly more complex chains with the Actions class.
Moving an element to an offset
We can get around this with the actions API.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.