NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package theKnot;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.time.Duration;
import java.util.List;
import org.openqa.selenium.WebElement;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;

import org.openqa.selenium.support.ui.WebDriverWait;

import io.github.bonigarcia.wdm.WebDriverManager;

public class getFontnames8 {

public static void main(String[] args) throws InterruptedException, IOException {
// TODO Auto-generated method stub
int count =0;

WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();

driver.get("https://www.theknot.com/paper/invitations?pageNumber=1");
for(int k=2;k<42;k++) {
String Url = "https://www.theknot.com/paper/invitations?pageNumber="+k;
List<WebElement> cardsno = driver.findElements(By.xpath( "//div[@class='bg--0c682']"));
// List<WebElement> Cards = driver.findElements(By.xpath("//div[@class='bg--0c682']"));
for(int i=1;i<=cardsno.size();i++)
{

FileInputStream instreamSet= new FileInputStream("/Users/jindala/eclipse-workspace/AdobeAmanAutomation/FontsData1 copy 2.xlsx");
XSSFWorkbook workbook = new XSSFWorkbook(instreamSet);
XSSFSheet sheet = workbook.getSheetAt(0);

String s = "(//div[@class='bg--0c682'])["+i+"]";
driver.findElement(By.xpath(s)).click();
String CardName = driver.findElement(By.xpath("//h1[@class='headline--4e85d']")).getText();
System.out.println(CardName);
String PersonalizeButton = "//button[@class='btn--2176c btn-transitions--b5689 disable-children-pointer-events--008ec lg--56dbd buttonL--7d46d primary--5b2c9 block--c4edc']";

// WebDriverWait ww = new WebDriverWait(driver,Duration.ofSeconds(50));
// ww.until(ExpectedConditions.presenceOfElementLocated(By.xpath(PersonalizeButton))).click();

WebElement element = driver.findElement(By.xpath(PersonalizeButton));
Actions actions = new Actions(driver); actions.moveToElement(element).click().build().perform();


Thread.sleep(20*1000);

driver.switchTo().frame("editorFrame");

WebDriverWait w = new WebDriverWait(driver,Duration.ofSeconds(50));
w.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("(//div[@class='textWrapper ng-binding'])[1]"))).click();

List<WebElement> ele = driver.findElements(By.xpath("(//ul[@name="itemsList"])[1]//a[@class='selected-li']"));

for (int j = 0; j < ele.size(); j++)
{
String fontName = ele.get(j).getAttribute("value");
System.out.println(fontName);
count = count+1;
XSSFRow row= sheet.createRow(count);

XSSFCell cell= row.createCell(0);
cell.setCellValue((String) CardName);

XSSFCell cell1= row.createCell(1);
cell1.setCellValue((String) fontName);

}
instreamSet.close();
String filepath= "/Users/jindala/eclipse-workspace/AdobeAmanAutomation/FontsData1 copy 2.xlsx";
FileOutputStream outstream= new FileOutputStream(filepath);
workbook.write(outstream);
outstream.close();
workbook.close();
System.out.println("=============Excel Updated=================");
System.out.println();
driver.get("https://www.theknot.com/paper/invitations?pageNumber="+(k-1));
Thread.sleep(1000);

}
driver.get(Url);
}
driver.close();
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.