Jump to content

Recommended Posts

Posted

How to use "pageRanges" with _WD_PrintToPDF()
?

 

Thank you in advance for your help.

mLipok

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/3/2021 at 4:05 PM, Danp2 said:

I'm sure that it could be done, but I don't currently have plans to implement this. 😉

 

Expand  

If you give me a hint where to search perhaps I could solve the problem? 😉

Posted

Not jet, will try.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 4/3/2021 at 4:05 PM, Danp2 said:

Retrieve XPath

I'm sure that it could be done, but I don't currently have plans to implement this. 😉

 

If you give me a hint where to search perhaps I could solve the problem? 😉
Does it belong to Webdriver or to AutoIt?

Edited by HJL
Posted

The proper usage is:

; Switch to frame by index
_WD_FrameEnter($sSession, 0)

and not:

; Switch to frame by index
_WD_FrameEnter($sSession, "0")

it must be Int not String because of this:

Func _WD_FrameEnter($sSession, $sIndexOrID)
.....
    ;*** Encapsulate the value if it's an integer, assuming that it's supposed to be an Index, not ID attrib value.
    If IsInt($sIndexOrID) Or IsKeyword($sIndexOrID) = $KEYWORD_NULL Then
        $sOption = '{"id":' & $sIndexOrID & '}'
    Else
        $sOption = '{"id":{"' & $_WD_ELEMENT_ID & '":"' & $sIndexOrID & '"}}'
    EndIf
.....

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

How to get list of frames ?
How to check which frame is currently used ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 4/3/2021 at 10:48 PM, Danp2 said:

The variable name is misleading. :rolleyes:

Expand  

Yeah. Take a look.
https://github.com/Danp2/WebDriver/pull/54

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Dear DAN

as you see in attachment1image.thumb.png.f919cdd8a71fd8aec16bd44591c7a1e6.pngthe script is working but i could not press the button inside the table .

i have got the element ID but i could not press it.

and there is only one and same ID for all buttons in the table.

as you see in 2nd attachment

 

and how i can select the row?

Thanks

IMG.png

Posted

image.png.069aabe0e0ffd494d8200c205dcb8d50.png

image.png.92543dd5b4dabd8f275ca5e1096e0fb9.png

 

  

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/3/2021 at 11:54 PM, mLipok said:

How to get list of frames ?
How to check which frame is currently used ?

Expand  

As so far I found such solution:
https://stackoverflow.com/a/37826944/5314940

Is there a way to use it here ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/4/2021 at 12:11 PM, samibb said:

as you see in attachment1 the script is working but i could not press the button inside the table .

Expand  

The attachment doesn't show me anything useful. You should know by now that we can't help based upon a screenshot. Show us the relevant code and the resulting output from Scite if you want our help.

P.S. Your post was moved here because the other thread is for UDF development, not help requests. 😉

Posted

@mLipok To get a list of frames, wouldn't the technique be the same as getting a list of any other element?

My thinking is that it is the coder's responsibility to track which frame is currently active. Have you looked at the functionality of _WD_IsWindowTop? Perhaps you could accomplish your goal with

_WD_ExecuteScript($sSession, "return window.self.name")

or

_WD_ExecuteScript($sSession, "return window.self.location")

 

Posted

 

 

Func press_View_Button()

 $sSession = _WD_CreateSession($sDesiredCapabilities)
  Local $sSearch = _WD_GetElementByid($sSession, 'search')

 _WD_ElementAction($sSession,$sSearch,'clear')
 _WD_setelementvalue($sSession,$sSearch,"rami bostaji")

    Local $View = _WD_GetElementByid($sSession, 'popTemplate')
        ;The ID = 'popTemplate' is same for all view buttons in the table.
    ;MsgBox(0,' $View', $View)
    _WD_ElementActionEx($sSession,$View,'Active')
    _WD_ElementActionEx($sSession,$View,'click')


EndFunc

***************************************************************************

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\11003813\Desktop\AutoIT\TraveSys.au3" /UserParams    
+>09:59:08 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0)  Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\11003813\Desktop\AutoIT\TraveSys.au3
+>09:59:09 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\11003813\Desktop\AutoIT\TraveSys.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop.
_WDStartup: "chromedriver.exe" --verbose --log-path="C:\Users\11003813\Desktop\AutoIT\chrome.log" 
+>09:59:51 AutoIt3.exe ended.rc:0
+>09:59:51 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 43.73
 

Posted

Dear @DAN

My Code

 

Func press_View_Button()

 $sSession = _WD_CreateSession($sDesiredCapabilities)
  Local $sSearch = _WD_GetElementByid($sSession, 'search')

 _WD_ElementAction($sSession,$sSearch,'clear')
 _WD_setelementvalue($sSession,$sSearch,"rami bostaji")

    Local $View = _WD_GetElementByid($sSession, 'popTemplate')
        ;The ID = 'popTemplate' is same for all view buttons in the table.
    ;MsgBox(0,' $View', $View)
    _WD_ElementActionEx($sSession,$View,'Active')
    _WD_ElementActionEx($sSession,$View,'click')


EndFunc

***************************************************************************

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\11003813\Desktop\AutoIT\TraveSys.au3" /UserParams    
+>09:59:08 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0)  Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\11003813\Desktop\AutoIT\TraveSys.au3
+>09:59:09 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\11003813\Desktop\AutoIT\TraveSys.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop.
_WDStartup: "chromedriver.exe" --verbose --log-path="C:\Users\11003813\Desktop\AutoIT\chrome.log" 
+>09:59:51 AutoIt3.exe ended.rc:0
+>09:59:51 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 43.73

 

  • Moderators
Posted (edited)

samibb,

Please post your future questions in the "Webdriver UDF - Help and Support" thread (where we are now) - three times now I have had to move your posts from the "Webdriver UDF" thread which is reserved for the actual UDF code itself. Thanks in advance for your cooperation.

M23

Edited by Melba23
Yet another move!

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...