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 in Selenium by anonymous
• 130 points
114 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 by Gitika
• 49,580 points
0 votes

Hi,

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

Xpath.getattribute("getHTML");

answered Oct 20 by Roshni
• 6,070 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,617 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
• 27,950 points
258 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,017 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31 in Selenium by Sri
• 2,970 points
4,963 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
2,905 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 in Selenium by Sri
• 2,970 points
3,331 views
0 votes
2 answers

How to Validate the real time application for which the input will be refreshed for every 4 s in the UI screen?

Hi, @Savitha, It can be achieved, just ask ...READ MORE

answered 6 days ago in Selenium by anonymous
• 49,580 points
52 views
0 votes
2 answers

How to work with blocks in Selenium?

Hello @Beks, You can simply use the jQuery each() method ...READ MORE

answered 1 day ago in Selenium by Niroj
• 77,920 points
14 views