Jump to content

Webdriver Firefox: Login to a website and get data from it. Learning Webdriver


Go to solution Solved by Danp2,

Recommended Posts

Posted (edited)

Maaan...

I missed the "Show all 13 assets"...

Why is the least used OS listed first?? Aside of me being dumb. This should be flipped.
I can run it now.

A collection of unfortunate circumstances... and not knowing that aarch = ARM

Thank you Dan! 😆

gecko.png

Edited by Blaxxun
Add Picture
Posted
  On 4/2/2023 at 1:41 PM, Danp2 said:

So I think we should be displaying @OSArch instead of @OSType

Expand  

Why not both information ?

 

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)

I have 5 Win10 machines here and one 8.1 machine on 12TB as a house video server plus this old Win7 laptop.
I dont know. I can test stuff on each of them if wanted. Just let me know

Edited by Blaxxun
Posted (edited)

E-Bill went from 14 Cent to 51 Cent here.
So i sayd FYou!

Not gonna consume at this price rate.

So from 86 inch TV & RTX 2080Ti VR PC to  Win7 old Laptop.
Just running here of my PV panels + my aquarium + Old Win7 Laptop.
Im off the train.

FUCK THE SYSTEM!

Edited by Blaxxun
Posted

I see that many people are starting to save money rationally, for example by using less energy-intensive devices.
Like in your case?

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/2/2023 at 6:27 PM, Blaxxun said:

I can test stuff on each of them if wanted. Just let me know

Expand  

Yes. Please test it with this code:

ConsoleWrite("! " & @CPUArch & @CRLF)
ConsoleWrite("! " & @OSArch & @CRLF)
ConsoleWrite("! " & @OSType & @CRLF)
ConsoleWrite("! " & @OSVersion & @CRLF)
ConsoleWrite("! " & @OSBuild & @CRLF)
ConsoleWrite("! " & @OSVersion & @CRLF)
ConsoleWrite("! " & @OSServicePack & @CRLF)

 

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

  • 1 month later...
Posted (edited)
  On 3/29/2023 at 10:21 PM, Danp2 said:

There are two updates available. The WinHTTP one shouldn't be ignored.

  Quote
Expand  

Semantics, but shouldn't this be tagged, and not just in the master? I also missed pulling the current version 1.6.4.2 because I went for the most recent Tag.

Edited by Decibel
Edit: explanation
  • 1 month later...
Posted

Hello, good day everyone!

I'm using webdriver now for a  tiny while and i'm usually able to solve things on my own. But now I ran into a "little" problem.
I want to get the content of a react table.
I was able to get all the content that is text based with a little rewrite of the _WD_GetTable() function.
Nice.

The thing is that one column of the table shows only icons in the form of class names. So there is no text.

So my question is: How the heck do i get the "attribute" or "name" or whatever of the class that says "Holiday" ?
 

<i class="Holiday" aria-hidden="true" style="width: 0.9em; height: 0.9em; color: rgb(255, 0, 0);" xpath="1"></i>

 

$sTest = _WD_ElementAction($sSession, $aElements[5], "NAME")
    ConsoleWrite("NAME " & $sTest & @LF)

Gives me "i"

$sTest = _WD_ElementAction($sSession, $aElements[5], "ATTRIBUTE")
    $sTest = _WD_ElementAction($sSession, $aElements[5], "PROPERTY")
    $sTest = _WD_ElementAction($sSession, $aElements[5], "TEXT")
    $sTest = _WD_ElementAction($sSession, $aElements[5], "VALUE")

Gives me empty string...

How?

Thanks! :)

  • Solution
Posted
  Quote

I was able to get all the content that is text based with a little rewrite of the _WD_GetTable() function.

Expand  

Please explain why the change was necessary and the exact change you made.

  Quote

So my question is: How the heck do i get the "attribute" or "name" or whatever of the class that says "Holiday" ?

Expand  

Here's the proper concept, pulled directly from wd_demo --

$sValue = _WD_ElementAction($sSession, $sElement, 'property', 'value')

and

Local $sSource = _WD_ElementAction($sSession, $sElement, "Attribute", "src")

 

Posted

@Danp2

Man, thank you. I now get the name of the class of each object.

I wont communicate the structure and the reason why i had to change _WD_GetTable()  here.

I'll send you a PM.

 

Local $Xp = "//div[@class='Status']/i"

$aElements = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, $Xp, "", True)

For $i = 0 To UBound($aElements) - 1
    $aArr[$i] = _WD_ElementAction($sSession, $aElements[$i], "Attribute", "class")
Next

 

Posted

But i have another question.
A dropdown menue. I can click it but i cant select anything from the List items. For example "100"

Red circle i can access with:

Local $Xp = "//select[@aria-label='Zeilen pro Seite']"
$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, $Xp)
_WD_ElementActionEx($sSession, $sElement, 'click')

Green Rectangle is unknown since i cant inspect it with a right click, nor hovering over the Webcode

Clipboard2.thumb.png.ebc72287a3409165af521cf210d83c54.png

Posted

take a look at: _WD_ElementSelectAction()

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...