fix tweet text xpath

now catches primary tweet text and not quote tweet text
This commit is contained in:
Penelope Gomez / Pogmommy 2023-03-02 16:55:50 -07:00
parent 7161156a2e
commit 78f84dc2d0
2 changed files with 1 additions and 2 deletions

View file

@ -150,7 +150,6 @@ driver.executeScript("document.body.style.zoom='35%'");
threadTweet = new Tweets("thread", r); //RESETS ALL THREAD TWEET VARIABLES TO START FRESH
debuglog(threadTweet.x.path,2); //PRINTS XPATH TO CURRENT ITERATE DIV
debuglog(await elements.getText(driver,threadTweet.x.path),2)
threadTweet.entryNotOpen = await elements.doesExist(driver,threadTweet.x.notEntryTweet) // CHECKS IF THE CURRENT ITERATE DIV IS THE ONE USED TO OPEN THE THREAD
if (threadTweet.entryNotOpen){ //CURRENT ITERATE DIV DOES NOT CONTAIN THE TWEET USED TO OPEN THE THREAD

View file

@ -18,7 +18,7 @@ class TweetPaths {
this.ageRestricted = `${this.path}//article//span[span[span[contains(text(),'Age-restricted')]]]/a[contains(@href,'notices')]`; //FIXED //xpath that reveals if tweet is age-restricted (& therefore not visible)
this.pinnedTweet = `${this.path}//article//div[@data-testid='socialContext']/span[contains(text(),'Pinned')]`; //FIXED /*//xpath that reveals if tweet is pinned*/
this.tweetText = `${this.path}//article//div[@data-testid='tweetText']`; //xpath that leads to div containing all tweet text //FIXED
this.tweetText = `${this.path}//article//div[div/div/div/div/div[@data-testid='User-Names']]/div[2]`; //xpath that leads to div containing all tweet text //FIXED
this.urlCard = `${this.path}//article//a[div[contains(@data-testid,'card')]]` //FIXED
//this.emoji = this.path + "//img"; //xpath that leads to div containing all tweet text
this.tweetURL = `${this.path}//article//div[@data-testid='User-Names']//div[3]//a[contains(@href,'status')]`; //xpath to tweet url //FIXED