Jump to content
Macro Express Forums

Testing web sites


Recommended Posts

Hi,
Are there any HTTP/HTML function in ME to help accessing and testing web sites?

 

I want to test a number of web sites using ME, but the buttons are located at different parts of the page so using mouse positioning etc. won't work.

 

Tabbing to a specific button won't work either as the layout is different for each site.

 

I think this is an area that Insight should be looking at as so much is done online now.

 

Any ideas?

Link to comment
Share on other sites

2 hours ago, robgratt said:

Tabbing to a specific button won't work either as the layout is different for each site.

Perhaps you need a separate macro for each site.

I'm not sure what you mean by "testing" the sites. 

You can connect to a web site from within a macro like this (though I'm not quite sure why it works):

Program Launch: "//www.maine.gov/dhhs/mecdc/infectious-disease/epi/airborne/coronavirus/data.shtml"" (Maximized)
Parameters:

 

Link to comment
Share on other sites

For all of its strengths, Macro Express is not the best tool for interacting with web content. There are techniques that one can use to identify and/or navigate to specific web controls, but these techniques are not programmatic. They involve fancy footwork: hunting for pixel colours, monitoring mouse pointer shapes, searching for static text, identifying "neutral" zones on a webpage that when clicked reset the tab order, making inferences about what is going on from the address line or title bar, tabbing or shift tabbing around... and combinations of all of the above.

 

These techniques can be made to work, but it's a slog. (A fun slog, but a slog nonetheless!) The solutions are rarely generalizable: they might work reliably for one web application or one webpage, and stop working the moment a developer starts messing with the CSS or revising the labels for web controls. I can't count the number of times that I've been forced to completely revise the Macro Express scripts that I use to drive outlook.com via keyboard.

Link to comment
Share on other sites

Thanks to everyone who replied.

 

I develop software for the web.  I have used ME for testing Windows applications in the past and it worked very well for the price.  However, Windows has a lot of hooks like window names, controls etc. that can be used to navigate.

 

I have tried to think of a way to access the website's DOM and thus maybe be able to activate a link or whatever via Javascript.

 

It would be great if Insight could do some development to make the DOM available and some commands etc. to manipulate them.  So much stuff is online line now, I feel they may be missing a trick here.

 

Anyway. thanks again for all the posts.  I'll just have to go back to tabbing and mouse positioning.

 

Hope you are all keeping well.

Link to comment
Share on other sites

Somehting like that is not simple and the interface is not simple. It would go in a direction of a proper programming language which is not the spirit of MEP. 

I moved to .NET becasue MEP is not the right tool for large batch automation of web pages. Mostly I don't even use a web browser but instead I send and receive HTTP requests/responses directly to the web server and process the data. It's fast and efficient and doesn't have the problem of trying to control another app.

Also sometimes I'll create a WinForm program with a WebBrowser control. As such, all the elements are as you describe and can programmatically read from, written to, and controlled. It works slick as the DOM is an object with methods and properties and there are nice features like being able to find an element by an ID or is position in somehting like a Div or table. 

I believe if you want to start interacting with a DOM, you need to get into a proper programming language. I don't think a 'meant to be simple and easy' app can do that without making itself just as complicated as a programming language. And since they already exist, no need to reinvent the wheel.

BTW I'm available for free consultations. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...