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
160 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,870 points
0 votes

Hi,

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

Xpath.getattribute("getHTML");

answered Oct 20, 2020 by Roshni
• 10,420 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 12, 2018 in Selenium by nsv999
• 5,520 points
3,948 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,000 points
296 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,520 points
4,661 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,010 points
5,492 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,890 points
3,321 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 2, 2020 in Selenium by Sri
• 3,010 points
3,932 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 13, 2020 in Selenium by Gitika
• 65,870 points
61,248 views
0 votes
3 answers

How do I resolve the ElementNotInteractableException in Selenium WebDriver?

ElementNotInteractableException ElementNotInteractableException is the W3C exception which is ...READ MORE

answered Dec 13, 2020 in Selenium by Gitika
• 65,870 points
37,162 views