Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Selenium web driver
- package javaapplication5;
- import org.openqa.selenium.chrome.ChromeDriver;
- public class JavaApplication5 {
- public static void main(String[] args) {
- System.setProperty("webdriver.chrome.driver", "C:\\Users\\One\\Desktop\\chromedriver.exe");
- ChromeDriver driver=new ChromeDriver();
- driver.get("http://localhost:14323/WebApplication1/");
- String a=driver.getTitle();
- System.out.println(driver.getTitle());
- driver.findElementByName("username").sendKeys("Hello");
- driver.findElementByName("password").sendKeys("Hi");
- driver.findElementByName("submit").click();
- String b=driver.getTitle();
- System.out.println(driver.getTitle());
- if(a.equalsIgnoreCase(b)) {
- System.out.println("Title Match");
- }else {
- System.out.println("Title not matched");
- }
- //driver.quit();
- }
- }
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <title>First page</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- </head>
- <body>
- <form action="secondpage.html">
- UserName:<input type="text" name="username">
- Password:<input type="password" name="password">
- <input type="submit" name="submit">
- </form>
- </body>
- </html>
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <title>First page</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- </head>
- <body>
- <h1>This is 2nd page</h1>
- </body>
- </html>
- ------------------------------------------------------------------------------------------------------------------
- AutoIT Excel
- #include <Excel.au3>
- #include <MsgBoxConstants.au3>
- #include <GUIConstantsEx.au3>
- GUICreate("Custom MsgBox", 210, 80)
- GUICtrlCreateLabel("This Script will open Microsoft Excel !!!!", 10, 10)
- $OKID = GUICtrlCreateButton("Ok", 10, 50, 50, 20)
- $ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20)
- GUISetState() ;display the GUICreate
- Do
- $msg = GUIGetMsg()
- Select
- Case $msg = $OKID
- Local $oExcel = _Excel_Open()
- Local $oWorkbook = _Excel_BookNew($oExcel)
- _Excel_RangeWrite($oWorkbook, Default, "Test", "A1")
- _Excel_BookSaveAs($oWorkbook, @TempDir & "\_Excel12.xls", Default, True)
- _Excel_RangeWrite($oWorkbook, Default, "2nd Test", "B1")
- _Excel_BookSave($oWorkbook)
- MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_BookSave Example 1", "Workbook has been successfully saved as '" & @TempDir & "\_Excel.xls'.")
- _Excel_Close($oExcel)
- $msg = $GUI_EVENT_CLOSE or $msg = $ExitID
- Case $msg = $ExitID
- case $msg = $GUI_EVENT_CLOSE
- //MsgBox(0,"You Clicked on", "Close")
- EndSelect
- Until $msg = $GUI_EVENT_CLOSE or $msg = $ExitID
- --------------------------------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment