in reply to some doubts on my first steps with WWW::Mechanize::Chrome

Thank you for using my module and giving feedback! It's always great to find people actually using your software!

The banner telling that the software is automated is (to my knowledge) not directly detectable by the website. If the website runs Javascript, I think it can detect that the page area is smaller than it "should" be, but other than that, there is no way to detect that there is nobody sitting in front of the browser.

I think the non-incognito mode is somewhat broken if you launch your own window. I'll have to add more tests to that. Currently I don't have a use case for this, so this has fallen a bit into neglect. I'm also not sure how I can test this behaviour well.

For reusing a tab, you will need to have the "main" Chrome instance started with --remote-debugging-port=9222. This will allow Perl to access your main Chrome instance. This is not really great, but I didn't find a better way to let Perl shoulder-surf.

Replies are listed 'Best First'.
Re^2: some doubts on my first steps with WWW::Mechanize::Chrome
by Discipulus (Canon) on May 04, 2020 at 07:41 UTC
    Thanks Corion,

    > I think the non-incognito mode is somewhat broken if you launch your own window.

    i miss the sense of this: I launch manually or I launch programatically ? This has to be combined with the following answer? I have to launch a new instance of chromium/chrome alone (as the only instance of the program) with --remote-debugging-port=9222 and then I can take the control of an already open tab (open manually) and I can also have non incognito mode off?

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      You have to manually launch "your" (the first) Chrome instance with --remote-debugging-port=922.

      Afterwards, if you launch a WWW::Mechanize::Chrome program, you tell it to connect to an existing tab and it should connect to the already running Chrome instance which has your cookies etc.

Re^2: some doubts on my first steps with WWW::Mechanize::Chrome
by 1nickt (Canon) on May 04, 2020 at 15:17 UTC

    Hi,

    "other than that, there is no way to detect that there is nobody sitting in front of the browser"

    As I mentioned in CB to Discipulus, my experience is that sadly, websites go to great and effective lengths to detect that very thing. Some specific things I have encountered that forced me to use Selenium::Remote::Driver to drive the browser:

    • Filling in a form field too fast (ie simply pasting/setting the value. Needed to add delay between keystrokes)
    • An invisible modal overlaid above the content (the form field is still in the DOM, but a human user has to click once to clear the modal and then into the form field)
    • Filling in a form field that is deliberately located "below the fold" (i.e. off screen, necessitating a human user to scroll the window)

    Hope this helps!


    The way forward always starts with a minimal test.

      and I was wondering what strategies they may use for tele-examining the studgents.

        First time I had to take an on-line driving class after a speeding ticket they didn't even have JS to see how long you remained on the page; I finished the 8-hr course in 40 minutes.

        My wife is studying for a Master's on-line at the moment. When she takes a test, she has to use a special browser they provide that can detect if any other browser is running. The webcam must be running and filming her. At random intervals she is prompted to pick up the laptop and turn to scan the whole room. The presence of another person or computer, books, wall posters or the like marks the test as questionable and alerts a human to review the video.

        Things have changed!


        The way forward always starts with a minimal test.