Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Session Cookies
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
6 pages
Vegetarian
Uploaded by
Latha 1030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Vegetarian For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
23 views
6 pages
Vegetarian
Uploaded by
Latha 1030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Vegetarian For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
Following selectors are allowed inthis solution old name + ypath(absolute and relative only, dynamic(axes) xpath is not allowed) + linkText Scenario: 1, Use appropriate Setup method to: Copy, Paste and use the following statement to set the driver property: System,setProperty("webdriver.gecko.driver’, "/home/user/Desktop/gecko © open application, © maximize the browser, © put an implicit wait of 10 second a Create atestng,xm by con}yting the TestNG class and put following 3 parameters tag: tl tag ©
ans
6
©
Intest method: 3, Open the application url: http: 4, Click on “Order Now" 5, Switch driver to the new window opened by the driver and print the url 6, Assert(using Assert class) to check ifthe ttle of the page is "Bootstrap Example", 7, Select Type as Vegetarian, 8, Fetch all the options present in the main dish dropdown and print thelr text values on 9, Click on “Weekend Offers” ink 10. Fetch the number of links present in the page and print itn the console as: "The number {s;" followed by the number fetched 11, Click on "Contact Us' link 12. Switch the window to the newly opened tab. 13, Find the ContactDetalls.xls file provided in _ Desktop-> user repo -> Tn Participant -> AdditlonalSuppliedFiles -> Contac Copy below path to use excell in Selenium scrit ‘home/user/Desktop/user repo/To Participant/AdditionalSuppliedFiles/Co 14. Use Ito provide details into Contact Us fn| Seinport java.io.File; 6 import java.io. FiletnputStrean; | 7 import java.io.FileNotFoundéxception; 8 inport java.to.FiledutputStrean; 9 inport java.io, 10Exception; 10 inport java.util. List; LL inport java.util. set; 12 inport java.util. concurrent. TineUnit 2 14 Anport org. apache, conons, io, Fileutils; 15 import org. apache. poi hssf. usermodel, HSSECeLL; 16 Anport org. apache, poi hssf.usermodel, KSSFROWs 17 import org. apache, poi hssf,usermodel. SSFSheet: 1B port org. apache, poi hssf.usernodel.HSSeHork book; Anport org, openqa, seleniun. By; imort 0fg. openga,seleniun, utputType; it org. openga, selenium, TakesScreenshot rt org, openga,seleniun webDrivers | inport org. openga,seleniun webElenent; rt org.openga, selenium, support..ui. Select; Org, testng, annotations. AfterClass; 07g. testng, annotations, BeforeClass; rg. testng. annotations, Paraneters; Org. testng. annotations, Test;| WebDriver driver; Se BeforeClass ¥ re void setup() System. setProperty(*webdriver.gecko.driver', '/h top/ gecko driver. gat(*http: //Localhost:8 manage() ,window().maximze(); a ver manage(),timeouts() implica tLywait (10, TimeUndt. SECONDS) ; 43 44} | 458 @Paraneters({"type' "dish", "mobi le!}) 46 Gest 47 public void et typ, String dis, String cur, String mob) throws ese 48 driver. findElement(By, LinkText ("Order Now!) click() 149 SeteString> vindovhandl: gethindowHandles(); 0 ali handle:windovha B 9 ” 4 .SwitchTo() window(handl) ; an url= getCurrenturl(); iflurl.equals( : t wit. println(url); String titlesdriver.getTitle(); title, drive findElenent (By xpath('/ I Cedriver. findélenent (By.1d( v Select{); ae ens67 ListedebElenent> ist=e, aetoptions|); 68 int size = list.size(); 69 for (int 10; Hesize;Ht+) 7 { 171 String option=list.get(H) .getText(); ) n \ System. out.println(option) B 4 driver, findelenent (By. LinkText ("Weekend Offers") .click(); int & .findElenents (By. taglane|" )).size(); 77 System. out.println('Th inks present 1§11"#a); | 78 driver. findélenent (ay, JinkTert tact Us')) .click()} 0 1 60 FiletnputStrean book=new FileinputStreant'/ } 81 HSsFHorkbook workbook = new 1ssPorkbock (both IBD HSGFSheet sheet=vorkbook. getSheet ("sheet"); 83 for (int 11; 1<¢3;i+) HSSFROW rowesheet .getRow(1); HSSFCell Cel L1=rov.getCelL(0); String nane=Cell1, ee vee driver, finden, xpath("// e\")")) sendkeys (nane) ; | HBSFOeIL Cel L2=rov.getcel (1); fing enail=celL2, getStringcelLValuel); iriver findelenent (By. xpath(*//*(@id=\" enail\"]")) ssendKeys (email); UL Cell3=row.getcell (2); ea a a indELenent (By. xpath("//*{ -celésrov.getell (3); serail getStringcelWalue()); aHSSFCalL Cel L4srov.getCelL(3); int beInteger,parselnt(Cell4.getStringcellValue(}); WebElenent driver. findelenent (By, xpath"//*l@id=\*help\"]*)}; Select f=new Select(d); 1104 f selectByIndex(b); N05 HESFCelL cellSrow.getCelL(4) bo: String addscell5.getStringcellvalue(); 107 108 driver, findElenent (By, xpath *]")) ssendkeys (add) ; 09 driver. findElenent (By. xpath(*/ vidi /di N13 Filevtils.copyfile(ten, new File( 12 File tenp=((TakesScreenshotdriver) .getScreenshotAs Output 14 HESFCeLL cel léerow.createcell (5); Py, H115 String are er. switchTo() alert() getText(); ie cell6,setCel lValue(nessaye) Ny ae tar cyt AledutputStrean out=new FiledutputStrean( hi workbook, write (out);
You might also like
Selenium Cheatsheet
PDF
No ratings yet
Selenium Cheatsheet
82 pages
Stqa Practical Final
PDF
No ratings yet
Stqa Practical Final
35 pages
STQA Journal
PDF
No ratings yet
STQA Journal
33 pages
SET Lab Record - CSE Final 2023
PDF
No ratings yet
SET Lab Record - CSE Final 2023
106 pages
STQA-Selenium Practicals
PDF
No ratings yet
STQA-Selenium Practicals
12 pages
CAP771 Assignments
PDF
No ratings yet
CAP771 Assignments
36 pages
Selenium Syntax
PDF
No ratings yet
Selenium Syntax
14 pages
Crack Selenium Interview 1 by 1
PDF
No ratings yet
Crack Selenium Interview 1 by 1
24 pages
S Det Selenium Imp File
PDF
No ratings yet
S Det Selenium Imp File
77 pages
Selenium Full Material
PDF
No ratings yet
Selenium Full Material
127 pages
Python Selenium Module Docs
PDF
No ratings yet
Python Selenium Module Docs
75 pages
Selenium
PDF
No ratings yet
Selenium
56 pages
Selenium Task 6
PDF
No ratings yet
Selenium Task 6
15 pages
Software Testing Lab Manual
PDF
No ratings yet
Software Testing Lab Manual
36 pages
Selenium Full Material Updated Greens
PDF
No ratings yet
Selenium Full Material Updated Greens
129 pages
Selenium Full Material Updated Greens
PDF
No ratings yet
Selenium Full Material Updated Greens
129 pages
5508 AmanTripathi Stqa
PDF
No ratings yet
5508 AmanTripathi Stqa
66 pages
Selenium PDF
PDF
No ratings yet
Selenium PDF
21 pages
Selenium Record
PDF
No ratings yet
Selenium Record
21 pages
Webdriver CheetSheet
PDF
No ratings yet
Webdriver CheetSheet
7 pages
Selenium Webdriver - Sneha Kesarwani
PDF
No ratings yet
Selenium Webdriver - Sneha Kesarwani
16 pages
20mis1080 Lab11
PDF
No ratings yet
20mis1080 Lab11
6 pages
Selenim Interview Questions (AutoRecovered)
PDF
No ratings yet
Selenim Interview Questions (AutoRecovered)
35 pages
8 - First Selenium Webdriver Script
PDF
No ratings yet
8 - First Selenium Webdriver Script
20 pages
Selenium Web Driver Command List
PDF
No ratings yet
Selenium Web Driver Command List
5 pages
Multiple Windows
PDF
No ratings yet
Multiple Windows
2 pages
Selenium Coding Exercises
PDF
No ratings yet
Selenium Coding Exercises
11 pages
SE&st Lab
PDF
No ratings yet
SE&st Lab
24 pages
Selenium Revision Interview
PDF
No ratings yet
Selenium Revision Interview
13 pages
1.launch The Below URL's in Firefox Browser
PDF
No ratings yet
1.launch The Below URL's in Firefox Browser
6 pages
Selenium TestNG Basics
PDF
No ratings yet
Selenium TestNG Basics
17 pages
Relative Xpath
PDF
No ratings yet
Relative Xpath
11 pages
Selenium Guide 1745548475
PDF
No ratings yet
Selenium Guide 1745548475
10 pages
Selenium Recipes in Java Sample
PDF
No ratings yet
Selenium Recipes in Java Sample
39 pages
Testing Lab Manual
PDF
0% (1)
Testing Lab Manual
26 pages
Ticket Booking New Testng
PDF
No ratings yet
Ticket Booking New Testng
10 pages
Software Testing Selenium
PDF
No ratings yet
Software Testing Selenium
38 pages
Crack Selenium Interview
PDF
100% (1)
Crack Selenium Interview
25 pages
Selenium WebDriver Cheat Sheet
PDF
No ratings yet
Selenium WebDriver Cheat Sheet
7 pages
Complete File
PDF
No ratings yet
Complete File
18 pages
STB Lab3
PDF
No ratings yet
STB Lab3
5 pages
Automation
PDF
No ratings yet
Automation
73 pages
What Is Automation Testing?
PDF
No ratings yet
What Is Automation Testing?
36 pages
Selenium Miscellaneous Scenarios
PDF
No ratings yet
Selenium Miscellaneous Scenarios
2 pages
Seleniumscripts 161031144953
PDF
No ratings yet
Seleniumscripts 161031144953
62 pages
Selenium
PDF
No ratings yet
Selenium
6 pages
Selenium Cheatsheet
PDF
No ratings yet
Selenium Cheatsheet
9 pages
S3
PDF
No ratings yet
S3
16 pages
Selenium My Notes
PDF
100% (1)
Selenium My Notes
15 pages
Selenium Recipes in Java Sample
PDF
No ratings yet
Selenium Recipes in Java Sample
40 pages
Selenium Project
PDF
No ratings yet
Selenium Project
7 pages
Selenium Test Case
PDF
No ratings yet
Selenium Test Case
5 pages
Advanced Selenium WebDriver & TestNG Cheat Sheet
PDF
No ratings yet
Advanced Selenium WebDriver & TestNG Cheat Sheet
6 pages
Selenium
PDF
No ratings yet
Selenium
12 pages
Selenuim Training Notes
PDF
No ratings yet
Selenuim Training Notes
9 pages
Selenium Notes
PDF
No ratings yet
Selenium Notes
7 pages
Selenium Programs
PDF
No ratings yet
Selenium Programs
6 pages