Pkillerjd Posted April 29, 2019 Share Posted April 29, 2019 i need to get the text in the middle of a label in html page from for attribute here is my html: <label for="item_0">1926</label> Link to comment Share on other sites More sharing options...
Nine Posted April 29, 2019 Share Posted April 29, 2019 .innerText will give you 1926...if this is waht you are looking for “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Pkillerjd Posted April 29, 2019 Author Share Posted April 29, 2019 @Nine i know that i have to filter through the getcollection only the label that have "for="item_0"" Link to comment Share on other sites More sharing options...
Nine Posted April 29, 2019 Share Posted April 29, 2019 3 hours ago, Pkillerjd said: i know that i have to filter through the getcollection only the label that have "for="item_0"" Then what do you DO NOT know ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Pkillerjd Posted April 30, 2019 Author Share Posted April 30, 2019 I usually get the collection and than with an if statement i filter the $oLink by it's value using $oLink.value now i would need something like $oLink.for Link to comment Share on other sites More sharing options...
Nine Posted April 30, 2019 Share Posted April 30, 2019 4 hours ago, Pkillerjd said: I usually get the collection and than with an if statement i filter the $oLink by it's value using $oLink.value now i would need something like $oLink.for I already told you... 16 hours ago, Nine said: .innerText will give you 1926...if this is waht you are looking for instead of .value “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Danp2 Posted April 30, 2019 Share Posted April 30, 2019 @Nine I believe the OP is unsure how to locate the element using the "for" attribute. FrancescoDiMuro and Pkillerjd 2 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Pkillerjd Posted April 30, 2019 Author Share Posted April 30, 2019 @Danp2 exactly Link to comment Share on other sites More sharing options...
Nine Posted April 30, 2019 Share Posted April 30, 2019 @Danp2 Why you let me resolve it ? @FrancescoDiMuro Why do like what danp2 has said ? And at @Pkillerjd seems you don't want to invest in searching : Local $colLabels = _IETagNameGetCollection ($oIE,"label") For $oLabel in $colLabels MsgBox ($MB_SYSTEMMODAL,"",$oLabel.getAttribute("for") & "/" & $oLabel.innerText) Next Pkillerjd 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted May 1, 2019 Share Posted May 1, 2019 6 hours ago, Nine said: FrancescoDiMuro Why do like what danp2 has said ? Because it's what the OP was trying to do, but you were keep suggesting him to use the property .value, which you didn't use in your last post, so, @Danp2 were right Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now