notes
notes
dev/apps/popup/#");
webelement open=driver.findelement(by.id("login"));
driver.click(open);
webelement submit=driver.findelement(by.id("//*[@id="wrapper"]/button"));
driver.click(submit);
driver.navigate.to("https://qaplayground.dev/apps/popup/#");
driver.gettext(open);
//td[@headers='CIPLA']/following-sibling::td[1]
class Test{
static int count=0;
Test(){
count++;
System.out.println(count);
}
public static void main(String args[]){
Test c1=new Test();
Test c2=new Test();
Test c3=new Test();
}
}
driver.get(windowhandles);
driver.navigate.to(parentURL);
driver.navigate.backto(childURL);
file srcfile=((TakeScreenshot)driver).getScreenshotas(OutPutype.file);
Certainly! Here's a consolidated reference sheet for common Java `String` methods:
---
---
This reference sheet covers the most commonly used methods in the `String` class in
Java. It provides a brief description and example code for each method, making it a
handy resource for string manipulation tasks.
int[] arr=[23,45,65,75,68,69]
int largest=0;
int second=0;
for(int i=0;i<arr.length;i++){
if (arr[i]>largest){
largest=arr[i];
}
}
for(int i=0;i<arr.length;i++){
if(arr[i]!=largest){
if(arr[i]>second);
second=arr[i];
}
system.out.print("largest is" +largest);
system.out.print("second largest is" +second);
}
Employee
EmpID, EName, ESalary
Department
DeptID, DName, EmpNumber
write a query to find Employee Name whose salary is greater than 5000 and less than
10000 and whose DName='IT'
P}"{
price.add
if(s.matches(""[A-Z].*));
syste.out.println(s)}
}
system.out.print(y+"");
}
system.out.printin();
cars.add("BMW");
cars.add("Audi");
String car=cars.get(1);
@DataProvider(name="logindata")
returnObject[][]{
{"user1","pwd1"},
{"user2","pwd2"},
{"user3","pwd3"}
}
@Test(dataProvider="")
git pull
git commit
git push;
POST companyabc.com/employee/addemp
int num=121;
int rev=0;
while(num!=0){
rev=rev*10+num%10; //11+110
num=num/10;
}
syso(rev):
sel.selectby(id);
get.selectedOptions();
Employee
EmpID, EName, ESalary
Department
DeptID, DName, EmpNumber
write a query to find Employee Name whose salary is greater than 5000 and less than
1000 and whose DName='IT'
SELECT E.EName
from Employee E
JOIN Departement D
E.DeptID=D.DeptID