Jump to content

grablestyp

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by grablestyp

  1. Problem in Chrome was user directory is already is use. So when I gave it fresh starts it started working and I moved on. Sorry if that's bad feedback, just wasn't the issue anymore. Can you clarify 2) and 3) for me and stop wasting time with my troubles? These "not gonna cut it" or "what exactly???" responses lead nowhere as much as unclear help requests. If I could explain better or do it all myself, I would. Not looking to become an expert, just want to solve this ASAP and move on.
  2. Sorry to double post. Nothing special in spreadsheet, that's why I try to avoid learning OOCalc functions, just manual copypaste stuff. I have main table and need data in "row" format in it. 1) Take links list https://i.imgur.com/RWonMQD.png (loop them with simple move down one row for manual/user imitation script) 2) Paste copied data to converter https://i.imgur.com/tcIygay.png (get my desired "row") 3) Than I have table with rows of data that I can sort etc. Example of page That's it. Everything I need from excel/LibreCalc is go to page, copy cell, go to cell adress, paste, copy row, paste it on another page, move spreadsheet down one row. Nothing fancy.
  3. Thanks, that worked. It would be my suggestion to add those to example/demo file and also explain that it requires fresh start. Helps to intuitively understand stuff, even if you're not supposed to do it that way. SetupBrowser functions are small enough to have couple additional rows. Tried that method but it didn't work for me, had to close browser and give script a fresh start for it to work. 1) Done 2) Is it possible to use ClipGet in _WD_Navigate($sSession, data copied to clipboard)? Or any other way for "data copied to clipboard -> becomes address to navigate" task. ClipGet didn't work for me. I have huge list of links (1k+) and need to go through all of them and do the same task. I guess my question is: what's best method to do it? In manual script I just used "Click down to go one row to the bottom and copy same A1 cell by location" caveman method. How do I do it in background&simpler? 3) Does _WD_FindElement require ' instead of " in XPath copied from browser's element inspection? Is there difference between: $sElement=_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@id='live-match-options']/li[3]/a/span[2]") $sElement=_WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@id="live-match-options"]/li[3]/a/span[2]") (that's how browsers copy XPath) I get errors with 2nd and no errors with 1st. Just want clarification. 4) And is there other way to copy clustered data from page, instead of copying 1 by 1? Data changes depending on category you clicked: https://i.imgur.com/poGS1pa.png https://i.imgur.com/PDApAX2.png So can you use matching elements example for it ; Locate multiple matching elements $aElements = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div/input", '', True) _ArrayDisplay($aElements, "Found Elements") Or it's better to just cluster copy it like I used to with MouseDrag https://i.imgur.com/OywEEB7.png Because if you have to copy them 1-by-1 and paste to spreadsheet, it will probably take more time (even with insane speed instead of user actions imitation), than to copy all at once and sort it later in spreadsheet (I already have sorting prepared, just need to paste data in proper cells). I don't care about speed or neat/optimized code that much. Just want it to work in background. 5) Any way to check if page is loaded instead of relying on sleep/pause? I saw third party methods that use plugins and JS status and read it to identify status in IF...ELSE function. Now that annoying cookies&updated terms disappeared because of proper chrome profile, I still have problem of loading to quickly or slow (1st launch/1st site visit) and my provider sometimes inserting info page into browser. Basically, my short question would be: how to "IF object exists continue ELSE pause" using WD functionality?
  4. Hello! Sorry for noobie questions that were asked 1000 times already, but I'm trying my best w/o actual knowledge. I made "manual" script for myself to do some repetitive "copy&paste" tasks. Problem is that it occupies PC. So in attempt to make it run in background run into this solution, but new problems arrived. 1) New user profile in browsers when using webdriver, that is stripped of useful extensions. Every freaking site shoves "Updated terms" or "Cookies" messages that ruins scripts. So how to do that? I understand that you can google examples, but not for this particular thing, even if expressions are the same. Where to define it, in SetupChrome function in $sDesiredCapabilities? My profile is in default location "C:\Users\username\AppData\Local\Google\Chrome\User Data\Default", so can somebody who uses his own profile help with this? 2) Since I need to loop same actions just with different hyperlinks from same site I thought it would be best just to use clipboard to get address from list in excel/libre doc and loop the whole thing. But when I tried using Clipget for navigation Local $sData = ClipGet() _WD_Navigate($sSession, $sData) it didn't work. Maybe it's dumb way to do it, but hope you can explain how to do -copy address from spreadsheet -navigate to it -copy stuff, click stuff, screenshot stuff, move screen around -paste it to spreadsheet -go to address+1 and repeat better. Don't care about formatting data on the fly or stuff like that, just want it copied w/o occupying PC and I will do formatting/analytics in spreadsheet later 3) I figured out how to find elements (buttons, etc) with XPath, but sometimes it produces error. Chrome/FF both copy XPath with " " and it needs to be ' ' in autoit, right? There's no difference in _WD_Navigate, but I had to manually change it couple of times to make it work for FindElement. Also, how do I simulate something like MouseClickDrag($MOUSE_CLICK_LEFT, 165, 400, 1100, 450) to select cluster of data. Site always formats data the same way, so I just need to navigate to proper element location and copy them all together(I format&convert in spreadsheet). Is there way to use Ctrl to make this selection in background, or I will need to find all the elements I need through XPath and copy the value? Thanks in advance for any help
×
×
  • Create New...