How do I make selenium check gmails quota storage and then execute another task in a new tab depending on the value

+1 vote

So on the bottom of gmail, there is a "0 GB (0%) of 15 GB used" and so on. What I want to do is, write a selenium task to open gmail, check the value of the % of the gb. If it is 10 or more. It will open a new tab and run a new task to go to takeout and backup files. 

I have already automated the takeout/backup files. But I want selenium to look at the gb % and  if over 10 gb, execute the other task, else just exit.

Is it possible? Using the inspect tool,  I managed to get the get this. This is what I manage to find when inspecting.


The xpath seems to be "//*[@id=":2c"]/div/div/div[1]"

Is this such a thing possible? 

Oct 15, 2020 in Selenium by anonymous
• 130 points
745 views

2 answers to this question.

0 votes

Hey, @There,

Try using the text() function with the XPath, then you can use conditions to check the percent.

answered Oct 20, 2020 by Gitika
• 65,890 points
0 votes

Hi,

Xpath.gettext try this if this doesn't work try

Xpath.getattribute("getHTML");

answered Oct 20, 2020 by Roshni
• 10,520 points

Related Questions In Selenium

0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 13, 2018 in Selenium by nsv999
• 5,500 points
6,130 views
0 votes
1 answer
+1 vote
1 answer

how do I escape the "/" in a textarea for Python3.7 with Selenium

@tchrisev, try using Robot class with following commands after your send_keys() ...READ MORE

answered Oct 29, 2019 in Selenium by Abha
• 28,140 points
1,469 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,451 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,015 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,129 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,809 views
0 votes
8 answers

How to open a link in new tab of chrome browser using Selenium WebDriver?

This below code works for me in ...READ MORE

answered Dec 14, 2020 in Selenium by Gitika
• 65,890 points
102,761 views
0 votes
3 answers

How do I resolve the ElementNotInteractableException in Selenium WebDriver?

Hi Abish, ElementNotInteractableException occurs when an element is ...READ MORE

answered Aug 21, 2019 in Selenium by Abha
• 28,140 points

edited Aug 4, 2023 by Khan Sarfaraz 106,307 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP