import org.apache.commons.lang3.ArrayUtils;
public class SortAndRemoveDuplicate {
public static void main(String[] args) {
int[] a = {1,5,3,2,1,11,7,5};
int l = a.length, s=0;
for(int j=0; j<l; j++){
for(int i=0; i<l-1; i++){
if(a[i]>a[i+1]){
s = a[i];
a[i] = a[i+1];
a[i+1] = s;
}else if(a[i]==a[i+1]){
a = ArrayUtils.remove(a, i);
l = a.length;
}
}
}
for(int n: a){
System.out.println(n);
}
}
}
What are the advantages of pom frame work in selenium?????????
ReplyDeleteMain advantage-
ReplyDelete1- avoid to write the duplicate locators for same WebElement which is the big issue in other frameworks.
2- Maintenance of the test script which becomes very easy.
3- improves readability
Tnk U .....
DeleteWhat is annotations?How ll u configure in Framework????
ReplyDeleteplz help Sanjay Kumar...i need d answer.....
ReplyDeleteThere are many annotations which has been provided in TestNG to make the scripting easy and code reusability.
ReplyDeleteHere are the Annotations used in TestNG-
@Test
@BeforeSuite, @AfterSuite
@BeforeTest, @AfterTest
@BeforeClass, @AfterClass
@BeforeMethod, @AfterMethod
@DataProvider
@Parameters.
How to use-
ex-
@BeforeMethod
public void openBrow(){
WebDriver driver = new FirefoxDriver();
System.out.println("open browser");
}
@Test
public void atTest(){
System.out.println("here 1st @BeforeMethod will execute then @Test");
}
can u tell me how to do email validation using selenium web driver
ReplyDeleteyou can refer this.
Deletehttp://selenium-makeiteasy.blogspot.in/search/label/send%20mail%20thru%20gmail%20with%20attachment
why we create FirefoxProfile object when work with ssl pop-up handling????
ReplyDeleteFirefoxProfile is used to change the default settings of the firefox browser which is going to open by webdriver.
Deletewhat is the need of creation of firefoxprofile object?
ReplyDeletesay if you want to save the file while downloading in a particular location or you don't want to pop-up that download popup so in this case you use FirefoxProfile.
Delete