I asked some questions about the scLocators, but I still don't manage to get something working with selenium. So there is an idea :
"How can I say to smartGwt : Attribute an ID in HTML".
I tried ensureDebugId("myId") but I don't know why, in my webapp I can't even find this ID.
I tried setId("myId") but it's the same, I can't see it in the HTML code generated. I'm totally lost in this project. Can someone help me ? :/
=> Using : maven, selenium web driver (htmlunit), gwt, smartgwt.
=> For : Unit testing client side of a web app.
Any help is Appreciated.
This approach is a dead end, it will not work.
Go back to the Automated Testing overview in SmartGWT's JavaDoc, and the Selenium user-guide.html in the SDK (in the "selenium" folder).
If you're having trouble with Selenium:
consider getting a 3.1d build from smartclient.com/builds since we've added yet more documentation since the 3.0 release
ask questions about the Selenium approach, because again the approach you're trying now won't work
Related
For example, entering http://mywordpresswebsite.example.com/?json=1 into the browser loads the main site html, the same as omitting the json querystring variable: http://mywordpresswebsite.example.com/
The JSON API is activated. I have tried reactivating and deactivating, checking .htaccess file settings, and deactivating all other plugins. None of those have made much difference so far.
TIA
I had the same problem with my localhost test page and was wondering, why my route worked last week and was not accessible this week.
Short explanation
After some tests and a lot of frustration, I was able to use the REST API Route again by following the wordpress documentation about routes-vs-endpoints with “Pretty Permalinks” and “Ugly” Permalinks
Longer explanation
I guess in my case it was based on the reinstall of my MySQL Database. By installing the new database, my previous setup has been reset to the wordpress standard installation with permalinks as "plain", which is an "ugly" permalink. That's the reason, why the answer of Mattygabe work for me after the reinstall of the database.
But with this solution, I had a problem with my filter value and therefore I found the solution with "pretty premalinks" and changed my permalinks to "Month and name", as shown in the picture. After this change, I could access my REST API via the desired route.
There could be also some difficulties with REST APIs related to the following examples:
using "wp" within the REST route
if you work on plugins, which should be shared, keep on mind that some plugins may restrict REST Access, e.g. iThemes Security
I'm likely doing it wrong, but when I form my requests for a Wordpress installation at http://www.example.com/ like this:
http://www.example.com/index.php?rest_route=/my/rest/route/here
I end up getting proper responses back.
I had a heck of a time figuring this out and ended up grokking a URL formatted like that in the HTML returned to me. I was expecting to make requests as http://www.example.com/wp_json/wp/v2/my/rest/route/here , but I only got HTML responses.
(FWIW, I am reposting this on all similar questions on the StackExchange network. Admins/mods - if this is against the rules or seen as rep spamming, feel free to take it down. Was hoping to help anyone else hitting the same issue I am, and to also learn what it is I've done wrong and why.)
Ok, so the new endpoint for Wordpress 4.7 is mywordpresswebsite.example.com/index.php/wp-json. It's part of Wordpress Core as of 4.7 and not a plugin anymore, there's nothing to be activated. Thank you, Mark Kaplun.
I also experienced this issue. I did install the WP API plugin and then realized I didn't need it so I deactivated it and deleted it. Afterwards I tried a GET request to https://example.com/wp-json/wp/v2/posts and received the HTML of my wordpress site.
To fix this I ended up deactivating all plugins and then I started receiving the JSON response from https://example.com/wp-json/wp/v2/posts so I stepped through each plugin reactivating and in the end all my plugins are active and the endpoint is responding with JSON.
I changed Permalinks (Settings => Permalinks)
I had an issue returning html page instead of JSON response on Wordpress 5.3 and I got resolved when I changed the Permalink as Post name from plain
Aim:
I´m testing a specific site and I want to check wheater the sent key-value-pairs are valid.
I need to get the queryString parameters (key-value-pairs) of a GET request on a website. The queryString is only accessible via the GET requests and is NOT in the url. (I want to compare these key-value-pairs from the website later with other key-value-pairs from a file/html/..etc.)
This is what I did and know until now:
I know I can visualize the K/V-pairs when using FireBug->Network->Parameters.
I can get a GET request with the Selenium WebDriver, but it is complicated to extract the queryString out of the JSON-Object. [I was using Java with jsoup and json.simple]
The only tool I know which can compare key-values on a website is Columbo.io, but I have to write the compared values manually into the tool- that is not flexible enough for my purpose.
In my research I found the following tools: PhantomJS, Ranorex, SmartBear TestComplete, Wetator, Sahi Pro, RedGlass, TestingBot, BugBuster, Canoo Webtest. I sadly cannot find out if these tools are able to give me the key-value-pairs I desire.
Problem:
With Selenium I expect to need a lot of time for writing tests, like maybe 2-4 weeks? So I am searching for other tools which can extract the key-value-pairs of a website easier or quicker.
Question:
Which tools can you recommend for getting these parameters easily?
And if there isn´t any better tool then Selenium then please tell me: maybe I´m overlooking some other issue and there are i.e. better API´s for parsing the JSON-Object to get the key-value-pairs or other things I could improve?
Are there any sites where I can read the experiences of other persons with specific tools.
PS: This is my first question here on Stackoverflow. I hope you can understand and help me.
I am not sure if I get your point correctly but if you want to play with HTTP requests and key-value-pairs, you may have a try to perform with Apache HttpClient which can be integrated with your Selenium-Webdriver java. Hope it can help.
It looks like the web test runner test.php was removed in CakePHP3 - and from what I can find, the suggestion to replace it is https://github.com/NSinopoli/VisualPHPUnit.
(source: https://github.com/cakephp/app/issues/12)
I am having trouble getting VisualPHPUnit set up so that it properly runs the tests in CakePHP3, and I can't seem to find the tutorial section that was intended to be written as mentioned in the above link.
Can anyone provide a tutorial, or pointers/suggestions for setting up VisualPHPUnit alongside a cakephp3 app, or as a plugin?
plz anyone can tell me how to open our project at Appmobi XDK. i am facing a problem that i have install it but its not allow me to open projects. when i tried to open my project a message comes unable to open a project.
now i need your help guys.
Thanks
The very first thing you need to do is to go to xdk.appmobi.com (in google chrome) and download/install our xdk. (Need Java installed also)
During the install you will need to set a default appmobi directory. This is where your app files will be stored.
Create a new app from within the XDK. You can then click the edit the source code button in the tool bar to edit your code. Here you can update the file with your own code.
You can check out a video that explains the xdk at http://www.youtube.com/watch?v=MWV8kOJlGmc Some things might have changed visually with the current version of the XDK, but essentially its the same.
Some things have changed/moved around the screen since we made the video, but essentially its functionally the same.
Check it out as it will give you tips/how To's to using the XDK.
Also, posting in our forums (forums.appmobi.com) will get your questions answered sooner!
I am developing a website in PHP and I am using mod-rewrite rules. I want to use the Netbeans Run Configuration (under project properties) to set code entry points that looks like http://project/news or http://project/user/12
It seems Netbeans have a problem with this and needs an entry point to a physical file like http://project/user.php?id=12
Has anyone found a good way to work around this?
I see your question is a bit old, but since it has no answer, I will give you one.
What I did to solve the problem, was to give netbeans what it wants in terms of a valid physical file, but provide my controller (index.php in this case) with the 'data' to act correctly. I pass this data using a query parameter. Using your example of project being the web site domain and user/12 as the URL, use the following in the NetBeans Run Configuration and arguments boxes. netbeans does not need the ? as it inserts that automatically, see the complete url below the input boxes
Project URL: http://project
Index File: index.php *(put your controller name here)*
Arguments: url=user/12
http://project/index.php?url=user/12
Then in your controller (index.php in this example), test for the url query param and if it exists parse it instead of the actual Server Request, as you would do normally.
I also do not want the above URL to be publically accessible. So, by using an IS_DEVELOPER define, which is true only for configured developer IP addresses, I can control who has access that special url.
If you are trying to debug specific pages, alternatively, you can set the NetBeans run configuration to:
http://project/
and debug your project, but you must run through your home page once and since the debugger is now active, just navigate to http://project/user/12 in your browser and NetBeans will debug at that entry point. I found passing through my home page every time a pain, so I use the technique above.
Hopefully that provides enough insight to work with your project. It has worked good for me and if you need more detail, just ask.
EDIT: Also, one can make the Run Configuration Project URL the complete url http://project/user/12 and leave the Index File and Arguments blank and that works too without any special code in controller. (tested in NetBeans 7.1). I think I will start using this method.