The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closing the new tab with changing header in Chrome
#1
Dear All, 

I'm trying to make a macro which will clicks the link in the red box from https://hk.yahoo.com/
I wish to open that link to a new tab and then close it and repeat the process.

However, every time the link is clicked , the new tab has a different header.

How could I modify the code so that it opens and close that tab regardless of what header it has??

The middle two lines of code is where i hope it would disregard the header and close the tab:


lef 327 2 w1 1 ;;text '日均家務13小時 近8...'
wait 30 WT w1 "日均家務13小時 近8成受訪母親年中無休 - 雅虎香港新聞 - Google Chrome"

Sorry if this is such a noob question...I am a noob Confused



Code:
Copy      Help
#region Recorded 13/5/2018 22:06:11
int w1=act(win("Yahoo雅虎香港 - Google Chrome" "Chrome_WidgetWin_1"))
lef 125 3 w1 1 ;;text 'Yahoo雅虎香港'
rig 441 236 w1 1 ;;Chrome_RenderWidgetHostHWND 'Chrome Legacy Window'
lef 13 9 wait(18 WV win("" "Chrome_WidgetWin_2")) 1 ;;menu item 'Open link in new tab'



lef 327 2 w1 1 ;;text '日均家務13小時 近8...'
wait 30 WT w1 "日均家務13小時 近8成受訪母親年中無休 - 雅虎香港新聞 - Google Chrome"


lef 383 18 w1 1 ;;push button 'Close'
wait 30 WT w1 "Yahoo雅虎香港 - Google Chrome"
lef 74 309 w1 1 ;;document
#endregion


Messages In This Thread
Closing the new tab with changing header in Chrome - by Catnip - 05-13-2018, 02:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)