Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row">
- <div class="span9">
- <h2>Request New Testimonial</h2>
- <form name="request" action="requesttestimonial.php" method="POST">
- <input type="text" name="requestroll" placeholder="Roll number of the person you want to request a testimonial" />
- <input type="submit" value="Send Request" name="submitrequest" />
- </form>
- </div>
- </div>
- <form class="navbar-form pull-right" method="POST" action="login.php">
- <input class="span2" name="rollnumber" type="text" placeholder="Roll Number">
- <input class="span2" name="password" type="password" placeholder="Password">
- <button type="submit" class="btn" name="signin">Sign in</button>
- </form>
- package org.openqa.selenium.example;
- import org.openqa.selenium.By;
- import org.openqa.selenium.WebDriver;
- import org.openqa.selenium.WebElement;
- import org.openqa.selenium.htmlunit.HtmlUnitDriver;
- public class Example {
- public static void main(String[] args) {
- // Create a new instance of the html unit driver
- // Notice that the remainder of the code relies on the interface,
- // not the implementation.
- WebDriver driver = new HtmlUnitDriver();
- // And now use this to visit Google
- driver.get("http://www.google.com");
- // Find the text input element by its name
- WebElement element = driver.findElement(By.name("q"));
- // Enter something to search for
- element.sendKeys("Cheese!");
- // Now submit the form. WebDriver will find the form for us from the element
- element.submit();
- // Check the title of the page
- System.out.println("Page title is: " + driver.getTitle());
- driver.quit();
- }
- }
- from twill.commands import go, fv, submit
- go('http://lcnitd.com/yearbook/2014/index.php')
- fv("2","rollnumber","10/CSE/2")
- fv("2","password","myPassword")
- submit('0')
- go('http://www.lcnitd.com/yearbook/2014/request.php')
- n=1
- roll="10/CSE/"
- while(n<100):
- sleep(2)
- temp=roll+`n`
- print n
- fv("2","requestroll",temp)
- n+=1
- submit('0')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement