Detect New Tab Open in Mozilla & Close it

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
RajanKap
Posts: 2
Joined: Tue Feb 07, 2017 2:31 pm

Detect New Tab Open in Mozilla & Close it

Post by RajanKap » Tue Feb 07, 2017 2:40 pm

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
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Detect New Tab Open in Mozilla & Close it

Post by iimfun » Thu Feb 09, 2017 8: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
RajanKap
Posts: 2
Joined: Tue Feb 07, 2017 2:31 pm

Re: Detect New Tab Open in Mozilla & Close it

Post by RajanKap » Thu Feb 09, 2017 10: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
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Detect New Tab Open in Mozilla & Close it

Post by iimfun » Tue Feb 14, 2017 8:39 am

!TIMEOUT_STEP

Thanks for testing.
Post Reply