Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
This week's book giveaway is in the
Python
forum.
We're giving away four copies of
High Performance Python for Data Analytics
and have Tiago Rodrigues Antao on-line!
See
this thread
for details.
Win a copy of
High Performance Python for Data Analytics
this week in the
Python
forum!
Ankit Prajapati
Greenhorn
+ Follow
1
Posts
0
Threads
0
Cows
since Feb 07, 2020
Merit Badge info
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (1/100)
Number Threads Started (0/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (1/10)
Number Threads Started (0/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by Ankit Prajapati
Selenium code issues to Validation for the added Deposit
import org.junit.Test; import org.junit.Before; import org.junit.After; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.core.IsNot.not; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.Dimension; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Alert; import org.openqa.selenium.Keys; import java.util.*; import java.net.MalformedURLException; import java.net.URL; public class Validation { WebDriver driver; JavascriptExecutor js; @Before public void setUp() { System.setProperty("webdriver.chrome.driver", "C:\\Ankit\\Selenium\\chromedriver.exe"); driver = new ChromeDriver(); js = (JavascriptExecutor) driver; } @After public void tearDown() { driver.quit(); } @Test public void test() throws InterruptedException { driver.get("http://techfios.com/test/billing/?ng=admin/"); driver.manage().window().maximize(); driver.findElement(By.id("username")).click(); driver.findElement(By.id("username")).sendKeys("techfiosdemo@gmail.com"); driver.findElement(By.id("password")).click(); driver.findElement(By.id("password")).sendKeys("abc123"); driver.findElement(By.name("login")).click(); driver.findElement(By.linkText("Transactions")).click(); driver.findElement(By.linkText("New Deposit")).click(); Thread.sleep(3000); driver.findElement(By.xpath("//option[@value='HomeLoan#2020']")).click(); driver.findElement(By.id("description")).click(); driver.findElement(By.id("description")).sendKeys("NHB7582"); driver.findElement(By.id("amount")).click(); driver.findElement(By.id("amount")).sendKeys("15000"); driver.findElement(By.id("submit")).click(); assertThat(driver.findElement(By.linkText("NHB7582")).getText(), is("NHB7582")); } }
show more
11 months ago
Testing