ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] Âà´«ieª«¥ó»yªk¬°Selenium(chrome) ?

¦^´_ 14# t8899


Sub test2()
    Set driver = CreateObject("Selenium.ChromeDriver")
    driver.Get "https://mis.taifex.com.tw/futures/disclaimer/"
    driver.findelementbyxpath("//*[@id=""content""]/main/div[2]/div[2]/button[1]").Click
End Sub

TOP

¦^´_ 11# t8899

xpath ¥i¥Hª½±µ copy, ¤£¥Î¤@­Ó¤@­Ó§ä.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2022-10-15 19:52 ½s¿è
¦^´_  t8899


Sub test2()
    Set driver = CreateObject("Selenium.ChromeDriver")
    driver.Ge ...
checkout88 µoªí©ó 2022-10-15 16:12

ÁÂÁ«ü¾É¡A¥Î³o­Ó³t«×§Ö¦h¤F

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2022-10-15 20:38 ½s¿è
¦^´_  t8899

F8³v¨B´ú¸Õ

Sub test()
Set driver = CreateObject("Selenium.ChromeDriver")
driver ...
singo1232001 µoªí©ó 2022-10-13 20:07


driver.SwitchToNextWindow
³o­Ó§Ú·Q¸õ¨ì¥t¤@­Óµ{§ÇÄ~Äò©µ¥Î¡A·|¥¢±Ñ ??
µ{§Ç¤§«e¦³¥Î Public DRIVER As Object

TOP

¦^´_ 24# t8899

³Ì¤W­±°£¤F
publice driver as object
¦h¥[¤@¦æ
public w1,w2


w1 ¸òw2 ¨S¸ò¹L¥h
¥Ø«e¬Ý¨Ó¬O ""

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2022-10-16 06:29 ½s¿è

¸É¥R»¡©ú¤@¤U

¥Îpublic ¬O¥þ³¡ªº¼Ò²Õmodule ¥]¬Aªí³æuserform ³£·|¦Y¨ì³á
   
¦pªG¨ä¥L¼Ò²Õ¤]¦³¥Î¨ì ´N¥Îpublic

¦pªG¤£·Qµ¹¨ä¥L¼Ò²ÕModule ªí³æuserform¥Îªº¸Ü

§ï¥Î
dim driver as object
dim w1,w2

¥Îdim ªº¸Ü ¦P¼Ò²Õ¤ºªº©Ò¦³sub³£¯à¥Î ¨ä¥L¼Ò²Õ¤ºªº¥Î¤£¤F

¦]¬°©È¦b¨ä¥L¼Ò²Õªºsub¤]¦³¥Î¨ìw1,w2 ¨ì®É­Ô½Ä¬ð

TOP

¦^´_  t8899

³Ì¤W­±°£¤F
publice driver as object
¦h¥[¤@¦æ
public w1,w2


w1 ¸òw2 ¨S¸ò¹L¥h
...
singo1232001 µoªí©ó 2022-10-16 02:16


¸Õªºµ²ªG ¥u¯à¥Î DRIVER.SwitchToPreviousWindow    ?
DRIVER.SwitchToWindowByTitle w1 '²Ä¤@­Ó¥æ©ö©Ò
DRIVER.SwitchToWindowByTitle w2 '²Ä¤G­Ó´Á¥æ©Ò
DRIVER.SwitchToNextWindow
³o3­Ó¤£¦æ?

TOP

¦^´_ 27# t8899


«Øij§A§âµ{¦¡½X¶K¥X¨Ó¦n¤F

¥i¯à¬O¨S¦³CLOSE±¼¤K

©ÎªÌ»Ý¨D»¡¤@¤U

TOP

¦^´_  t8899


«Øij§A§âµ{¦¡½X¶K¥X¨Ó¦n¤F

¥i¯à¬O¨S¦³CLOSE±¼¤K

©ÎªÌ»Ý¨D»¡¤@¤U
singo1232001 µoªí©ó 2022-10-16 07:42


¸Ñ¨M¤F
§Ú¥Îpublic w1 , ¤S¥Î DIM w1 , §âdim w1 ®³±¼´N¦n¤F
ÁÂÁÂ!

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2022-10-18 20:36 ½s¿è

¦^´_ 28# singo1232001

Sub test()
Set DRIVER = CreateObject("Selenium.ChromeDriver")
DRIVER.Get "https://tw.stock.yahoo.com/quote/1101.TW"
Set td = DRIVER.FindElementByXPath("//*[@id=""qsp-overview-realtime-info""]/div[2]/div[2]/div/ul")
Cells.ClearContents
' td.AsTable.ToExcel Cells(1, 1)
End Sub
¹Ï¤¤®Ø°_¨Óªº¦Ç¦â®Ø®Ø¤£¬O¤@­Ótable ??
­n¦p¦ó¥Htable¤è¦¡¶×¤Jexcel ?

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD