Detect New Tab Open in Mozilla & Close it

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Detect New Tab Open in Mozilla & Close it

by RajanKap on Tue Feb 07, 2017 7:40 am

Team,

I browse to a page which has a bunch of links , Each link does a Postback to a Remote server & get's a URL in response & then that received URl is opened as a Tab in Mozilla Browser . The time it takes for the Postback to return varies from widely & hence i need assistance to automate this in Imacros . Basically

1. Tab1 has all links , which can be clicked by a Tag command
2. Once the Postback is Received , the URL is opened in Tab 2

ASK: We need to wait till the Tab 2 is active ( this can be anywhere between 20 seconds to 2 minutes post link click on Tab1 )
wait 2 seconds & close the Tab 2 .

Please help on any pointers on how to achieve this via Imacros . I am not a programming guy , so please be a little detailed in response

Any assistance is appreciated
RajanKap
 
Posts: 2
Joined: Tue Feb 07, 2017 7:31 am

Re: Detect New Tab Open in Mozilla & Close it

by iimfun on Thu Feb 09, 2017 1:19 am

Try to add the following part of the macro to yours
Code: Select all
TAB T=1
TAB CLOSEALLOTHERS
SET !TIMEOUT_STEP 180
TAB T=2
WAIT SECONDS=2
TAB CLOSE
iimfun
 
Posts: 201
Joined: Tue Jul 19, 2016 6:06 am

Re: Detect New Tab Open in Mozilla & Close it

by RajanKap on Thu Feb 09, 2017 3:19 am

Thanks for the response ,
As per the post , The code will be Waiting for 180 seconds at step to ensure TAB=2 is avalibale & close it after 2 seconds .

As sometimes the post back will come in 10 seconds , it will be long wait & increase overall task time .

What i was looking was a way to detect somehow Tab2 is opened ( maybe check on a Tab open event, if there is one or something similar ) & then close it after 2 seconds .

Any response is appreciated
RajanKap
 
Posts: 2
Joined: Tue Feb 07, 2017 7:31 am

Re: Detect New Tab Open in Mozilla & Close it

by iimfun on Tue Feb 14, 2017 1:39 am

!TIMEOUT_STEP

Thanks for testing.
iimfun
 
Posts: 201
Joined: Tue Jul 19, 2016 6:06 am


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 4 guests

Website Monitoring