Search found 31 matches

by CH HAN
14 Aug 2018, 16:30
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

malcev wrote:

Code: Select all

#Persistent
driver := ComObjCreate("Selenium.ChromeDriver")
driver.Get("http://www.google.com")
driver.ExecuteScript("window.open();")
driver.SwitchToNextWindow
driver.Get("http://www.google.com")

It works!! Thank you!! :bravo:
by CH HAN
03 Aug 2018, 18:19
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

Hi, Does anyone know that ways to get control new tabs? I want to use and navigate new tabs but I don't know how to do that. I googled but I can only find results about java, python and others which not fit for autohotkey. Using driver.getWindowHandles() and driver.switchTo().window(tabs.get(0)) are...
by CH HAN
28 Jan 2018, 01:12
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

Set defaults of Chrome browser driver:= ComObjCreate("Selenium.CHROMEDriver") ;Chrome driver driver.AddArgument("disable-infobars") ; Close Message that 'Chrome is being controlled by automated test software' driver.AddArgument("--start-maximized") ; Maximize Chrome Browser driver.Get("http://duckdu...
by CH HAN
22 Jan 2018, 02:52
Forum: Ask For Help
Topic: How to use controls sharing same ClassNN?
Replies: 10
Views: 1372

Re: How to use controls sharing same ClassNN?

BoBo wrote:Just out of curiosity. Aren't these web-based 'controls' ?
No, it's not. It's an ordinary application run on windows.
by CH HAN
22 Jan 2018, 01:27
Forum: Ask For Help
Topic: How to use controls sharing same ClassNN?
Replies: 10
Views: 1372

Re: How to use controls sharing same ClassNN?

- It may be that the fields are part of the same control, and that the Edit control only appears when you a field is focused (ready to type something in). This is true in Explorer, only when you are renaming a file, does an Edit control appear. - So a possible solution would be to use ControlClick ...
by CH HAN
21 Jan 2018, 05:51
Forum: Ask For Help
Topic: How to use controls sharing same ClassNN?
Replies: 10
Views: 1372

Re: How to use controls sharing same ClassNN?

- Did you try looping through the controls and retrieving text? - It may be that the Edit control only shows when you are renaming an item. E.g. this happens when you rename a file in Explorer. - See the example, 'get control information for the active window (ClassNN and text)', here: jeeswg's Not...
by CH HAN
19 Jan 2018, 11:17
Forum: Ask For Help
Topic: How to use controls sharing same ClassNN?
Replies: 10
Views: 1372

Re: How to use controls sharing same ClassNN?

MaxAstro wrote:Use the hWnd instead of the ClassNN, it is more likely to be unique.
Thank you for the suggestion, but hWnd of the elements are also same. Anyway, Thank you!!
add1.jpg
add1.jpg (12.08 KiB) Viewed 1321 times
add2.jpg
add2.jpg (13.22 KiB) Viewed 1321 times
by CH HAN
14 Jan 2018, 04:10
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

@Joe Glines Sorry for the late reply, I've not touched Selenium for long time. The answer is Yes. Sometimes Selenium just continues codes even while browser is still loading a page so I change the waiting code like the below but it still not works perfectly either. driver.executeScript("return docum...
by CH HAN
05 Jan 2018, 15:41
Forum: Ask For Help
Topic: How to use controls sharing same ClassNN?
Replies: 10
Views: 1372

How to use controls sharing same ClassNN?

00.jpg
00.jpg (12.26 KiB) Viewed 1372 times
01.jpg
01.jpg (39.75 KiB) Viewed 1372 times
02.jpg
02.jpg (41.43 KiB) Viewed 1372 times
As you can check above, controls I want to use have same ClassNN which makes me frustrated. I've tried many times many ways to control it, but I can only use first control among the controls sharing same ClassNN. Anybody has any solution about it?
by CH HAN
16 Dec 2017, 01:48
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

You should check this code to wait for a web page is loaded.

Code: Select all

driver.executeScript("return document.readyState").equals("complete") ; wait until page loads
by CH HAN
16 Dec 2017, 01:42
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

I've found the answer of the question I posted above, it's using brackets. If you want use elements sharing same Xpath, you should add brackets end of Xpath like (Xpath)[2] or (Xpath)[3] driver:= ComObjCreate("Selenium.CHROMEDriver") ;Chrome driver driver.Get("http://the-automator.com/web-scraping-w...
by CH HAN
10 Dec 2017, 04:00
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

A code below can help you to use Ctrl+A

Code: Select all

driver.FindElementByXPath(Xpath).sendKeys(driver.Keys.CONTROL, "a") ; Ctrl+A
by CH HAN
10 Dec 2017, 03:56
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

@ Joe Glines Thank you. Your code looks more efficient! Now I'm searching for ways to get all Xpaths and innterTexts which contains a specific word driver:= ComObjCreate("Selenium.CHROMEDriver") ;Chrome driver driver.Get("http://the-automator.com/web-scraping-with-autohotkey/") keyword:="website" if...
by CH HAN
08 Dec 2017, 18:50
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

If you want to find a specific text on a web page, you can use codes below

Code: Select all

keyword=  ; keyword you want to find

Xpath = //*[text() = '%keyword%']
		
if(driver.FindElementByXPath(Xpath))
	driver.FindElementByXPath(Xpath).click()
by CH HAN
07 Dec 2017, 00:02
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

@malcev
Wow!! it works!! Thank you!! Now I can control Chrome that I want ways, Thank you again!!!!
by CH HAN
02 Dec 2017, 18:48
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

R_google_drive.jpg I still don't know how I open right-click menu using Selenium. Even I tried to use COM to open a right-click menu but all methods I tried has failed. wb := IEGet("My Drive - Google Drive - Internet Explorer") ; everything is not working /* wb.document.getElementsByTagName("SPAN")...
by CH HAN
02 Dec 2017, 18:33
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

Hi, I've figured out a way to use Xpaths including ""(quotation-marks). driver:= ComObjCreate("Selenium.CHROMEDriver") ;Chrome driver driver.Get("https://www.google.com/") ; Put a keyword 'AutoHotkey' in a blank Xpath = //*[@id="lst-ib"] driver.FindElementByXPath(Xpath).SendKeys("AutoHotkey") driver...
by CH HAN
01 Dec 2017, 12:57
Forum: Ask For Help
Topic: [ ComObj IE ] Open Right-Click Menu on IE using COM
Replies: 0
Views: 309

[ ComObj IE ] Open Right-Click Menu on IE using COM

Hi, I tried to open right-click menu on IE using COM, but all approaches I tried has failed. Does anybody know any ways to open the right-click menu and select one of elements? wb := IEGet("My Drive - Google Drive - Internet Explorer") ; everything is not working /* wb.document.getElementsByTagName(...
by CH HAN
12 Nov 2017, 04:00
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

@ Xtra Thank you, but it's not working... URL = http://the-automator.com/ run % "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --remote-debugging-port=9222" ( winExist("ahk_class Chrome_WidgetWin_1") ? " --new-window " : " " ) URL driver := ChromeGet() ; To click 'Web Scraping' driver....
by CH HAN
11 Nov 2017, 17:10
Forum: Tutorials
Topic: Using Selenium with AutoHotkey- Cross browser automation!
Replies: 135
Views: 53115

Re: Using Selenium with AutoHotkey- Cross browser automation!

@ Xtra Thank you for quick answer. Your code is good. It can help me save code, but I want to 'CLICK' mouse right button on a specific element of a web page :) And there is another problem (I changed my code above of my post while you uploaded your post.) which an error message is that The following...

Go to advanced search