Skip to main content

Posts

Showing posts from March, 2019

Change Auth Routes in Laravel

replicate all the routes then remove the helper. Auth::routes is a shortcut for { // Authentication Routes... $this ->get( 'login' , 'Auth\LoginController@showLoginForm' )->name( 'login' ); $this ->post( 'login' , 'Auth\LoginController@login' ); $this ->post( 'logout' , 'Auth\LoginController@logout' )->name( 'logout' ); // Registration Routes... $this ->get( 'register' , 'Auth\RegisterController@showRegistrationForm' )->name( 'register' ); $this ->post( 'register' , 'Auth\RegisterController@register' ); // Password Reset Routes... $this ->get( 'password/reset' , 'Auth\ForgotPasswordController@showLinkRequestForm' ); $this ->post( 'password/email' , 'Auth\ForgotPasswordController@sendResetLinkEmail' ); $this ->get( ...

Resource Controllers in Laravel

Laravel resource routing assigns the typical "CRUD" routes to a controller with a single line of code. For example, you may wish to create a controller that handles all HTTP requests for "photos" stored by your application. Using the  make : controller  Artisan command, we can quickly create such a controller: php artisan make : controller PhotoController -- resource This command will generate a controller at  app / Http / Controllers / PhotoController . php . The controller will contain a method for each of the available resource operations. Next, you may register a resourceful route to the controller: Route :: resource ( 'photos' , 'PhotoController' ) ; This single route declaration creates multiple routes to handle a variety of actions on the resource. The generated controller will already have methods stubbed for each of these actions, including notes informing you of the HTTP verbs and URIs they handle. You may register many resource...

selenium actions

package automation.selenium; import java.awt.AWTException; import java.util.NoSuchElementException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.openqa.selenium.support.ui.Select; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; public class actions implements actionsInterface { private WebDriver driver; actions() { System.setProperty("webdriver.chrome.driver", "E:\\selenium\\driver\\chromedriver.exe"); this.driver = new ChromeDriver(); } void excute(String[] data) throws NumberFormatException, InterruptedException, AWTException, IOExceptio...

How to get start with selenium

selenium create your first automation test The following three software are prerequisite to get stared with  selenium. Java => Environment and programming language to write script Eclipse  =>  To run script selenium => Framework to test script WebDriver => To run test in specific browser. 1. Java.     Download java by clicking here  and download latest JRE file according to you OS. After installing java add Environment variable to Jdk/Bin folder in my case it is C:\Program Files\Java\jdk-11.0.2\bin. 2 . Eclipse              Download the eclipse from official website or click here . 3. selenium     Go to selenium website by clicking here  to download latest or download to download any previous version click here.   I went to 3.9 folder and downloaded two files. selenium-server-standalone-3.9.1.jar selenium-server-3.9.1.zip Extract the z...