How to add new .php page into test rail? - testrail

Official guide told us, that we should place .php page near index.php (for example).
But how I can do it, if I have test rail installation on the cloud (test rail.net)?
I need to add buttons to start our tests. But i can send request from javascript only to the same domain. So, I need a custom php page.

You cannot do this if you are on the cloud.
[source]

Related

Add HTML file to React project

I am currently making a personal portfolio for myself in React. I have some projects I would like to add to my React sites that were created using HTML, CSS and vanilla JS. I'm looking for a way to easily add them into my project. They are not currently hosted anywhere. I know this should be rather simple but I'm not sure exactly how to express what I am trying to do. Any help would be greatly appreciated.
If they were created only using HTML, CSS and vanilla JS, then you can host them at GitHub Pages.
After this, use an iframe element to insert them into your React project.
I should also add it's also completely free and very easy to host static sites made with html/css/js with google's firebase. I've even deployed a couple production level applications on firebase and the clients have used them for a while without issues. The links to your projects will feel more "professional" if you host them on firebase instead of on github pages in my opinion.
Refer to this to learn how to host your site on firebase. The general rundown though is you log onto firebase with a google account of your choice, create a new firebase project (think of it as an empty space on the cloud to "host" your site), then you install command line tools for firebase (similar to when you first installed git or npm), then use the command line tool to login, select the project you created, initalize firebase in the directory of the react portfolio's index.html that you want to host, then you simply run the command firebase deploy --only hosting. It then tells you the url which your site is hosted.
You can also simply add links to your hosted projects instead of putting their entire page on your portfolio via iframe like was suggested. You could also take some nice screen shots and make a slider to showcase each and provide the link to the actual site on click. Just some ideas.

Google Sites HTML export keeps redirecting to live site

I was trying to export a Google Site I made for a project. I used wget to spider through every page and to download the html files and linked content. When I try to open "index.html" in Chrome, it does open the local HTML file, but it redirects me to the live version immediately after.
Is there anyway I could modify the HTML code so that it won't head straight to the actual website? I just want to have a local copy of it for reference, and I don't want to store it on Drive.
As the HTML file is too big to type out, I have provided it on Pastebin here.
.
You need a better question. No website works offline, or they do if you download all the files to your user’s computer so the user can view it offline. But at some point they had to visit it online to get it.
Or you save it as an html site and hand it to them on a USB drive. That’s offline to that extent. But then it’s not really a website, its an html file.
Or otherwise, if you need a website for your school which can be used by anyone through internet / intranet, you have two options -
1. Create and host a website in an online server
. a. You have to buy space and deploy a server yourself.
. b. They will a run website in their webserver for you. You just need to give money
2. Deploy a webserver in the school's any one machine and get it in other machines.
Rephrase the question for a better answer.

Can the manifest file be dynamic in Chrome Apps?

I am writing a Chrome App that communicate with a web page. For that I have added something similar in my manifest file.
"externally_connectable": {
"matches": ["*://*.example.com/*"]
}
But the "example.com" has to be dynamic as individual customers has their one web server.
Is there any possibility, user(who install the app) can change the externally_connectable site/s.
There is an alternative way a web page can communicate with extension through content script. This approach can be used if both web page and extension are done by you.
E.g.
web page <--> content script of extension <--> background script of
extension <--> native application
For web page to content script of extension communication use window.postMessage and window.addEventListener
For Google Chrome browser,
For content script of extension to background script of extension communication use chrome.runtime.sendMessage and chrome.runtime.onMessage.addListener
For background script of extension to native application communication use chrome.runtime.sendNativeMessage
Please make sure your code has necessary security in place.
As far as I know the "externally_connectable" is the only official way to send messages (With data) from a web page as mentioned here
This requires a predefined values for every single domain. But what if you want to make only one extension to accept messages from any web page?
If you just want to notify the other side about some thing, you can use the native JS Event dispatching it on the document from one side and listening to it at document also from the other side as the document is shared between the extension content script pages and the web page.
You can't use JS CustomEvent to send data as every time you send data, you receive it empty as a result of sandbox effect of any extension.
If you want to share data so the only workaround I know so far - after spending about one month developing an extension - is to have a combination between some sort of a storage and the JS native Event mechanism.
The solution in steps (suppose you need the web page to send some data to the extension):
Make an event on document from the web page.
Save the data temporarily inside any storage technology you prefer
(localStorage, the DOM itself, or what ever..)
Receive the event at the other side (extension) by listening on the
document.
Read data and remove it.
Hope this helps someone or open a door for a discussion on a better way doing this.

Hosted script to click a button on another website

Is it possible to make a script that clicks an HTML button on a website, that I do not have acces to, and then returns that website's source to the script, after the button has been clicked?
It sounds a bit confusing so I'll explain a bit further.
There is this website (a website with a bunch of articles) that has a button, that creates a link to a bunch of articles. The problem here is that the link is not direct (it cannot be accessed via the URL bar). So would it be possible to create a script (preferably PHP) that clicks the HTML button, and then returns the source code, containing information about the articles, to the script? Also that script should be runnable from my website url (hosting).
Please let me know if this isn't adequate. English is not my main language.
You can try php client for webdriver which created by facebook.
You can find the repo here
https://github.com/facebook/php-webdriver.
This allow you to not only click HTML element with PHP, but also upload a file, expecting alert etc.
As it is written on the readme "PHP-webdriver library is PHP language binding for Selenium WebDriver, which allows you to control web browsers from PHP". So It is literally like "virtual browser" which you can control with PHP!
Well maybe you will ask "What is Selenium?".
You can find the repo here https://github.com/SeleniumHQ/selenium/
Selenium is an umbrella project encapsulating a variety of tools and libraries enabling web browser automation
So it can be used as multipurpose tool. Such as web testing, virtual browser, control web browser on another computer, etc.
PHP-webdriver uses the similar concept to Java, .NET, Python and Ruby bindings from Selenium. And the new version PHP client was rewritten from scratch in 2013.

How do I create a website using HTML?

I have recently learned how to write HTML pages on a standalone computer, with all the references given to the directories in the local drives.
How, then, can I do the following:
Create a website, using HTML. I know I'll be able to create its look, but I don't know what should be given as the reference address (URL) if there is a hyper link (like: href). So how do I get an address that can be used on the Internet?
How do I upload this file to the Internet, do I have to upload it onto a server? If yes, which?
If there are multiple pages then how do I create references between?
Most importantly if I have to create this site should I use HTML, or something else?
When developing a website you will want to observe the following:
You need to regsiter a domain name that you want people to use to access your site. You can do this using any number of online registrars
You will have to get a web host...again there are many. They will give you instructions to upload using FTP or otherwise
The references between pages on your website will have to use relative addresses. That is /page2.html rather than http://www.myserver.com/page2.html.
You have to use HTML to create the front end. Plus CSS and maybe JavaScript. If you need dynamic content like accessing a database etc then you have to learn server side languages like PHP, ASP.NET or JSP.
To reference pages and resources (images, css, et.c.) you can use either relative paths, virtual paths or absolute paths.
A relative path shows the relation between the items, for example:
An image in the same folder: art.gif
An image in a subfolder: images/art.gif
An image in a parent folder: ../art.gif
An image in a parallel subfolder: ../images/art.gif
A virtual path starts with "/", so it's relative to the root folder of the site:
An image in the root folder: /art.gif
An image in a subfolder: /images/art.gif
An absolute path specifies the complete URL to the resource:
An image in a subfolder: http://www.mysite.com/images/art.gif
To put the pages on the net, you need some kind of hosting. You can start with searching the web for "free hosting" and you will find plenty of sites where you can try this out.
Most free hosting offer a subdomain or subfolder for your site, like mypage.thewebhost.com or www.thewebhost.com/mypage. If you want your own domain like www.mypage.com you need to register it for a fee. Many hosts offer a domain name "for free" when you buy web space, but you will of course end up paying for it in the end as it's included in the fee for the space.
Regardless of how you create the page, it will use HTML in the end. That's what the web is made of. If you use a server side language like ASP.NET or PHP, they still output HTML pages for the browser.
This is a great site if you're just getting started with HTML: http://www.w3schools.com/
I think you are asking about how to publish your site on the web and then access it.
Buy a domain, go to any domain hosting site like godaddy.com etc.
After buying domain the domain hosting company will send you the details of your account/pwd
With you account pwd you can access their ftp server.
Put your current html pages on their ftp server (put them in the public folder)
Access your html pages on the web now.
Also note it will take atleast a few minutes before your domain info gets published on the dns servers, i.e to say it will take a while before you can access your website (usually a few minutes)
Try giving relative urls in the href link. For e.g. if you want to link index.html to page1.html in the same folder you don't need to give complete path of the page1.html for the link. You can simply write Page 1
You can learn more about relative urls from here
You can get a free web hosting account from sites like http://110mb.com , they also provide a free sub-domain and a ftp account.
You need HTML to create webpages. There's no other option.
Hope this helps.
Google is your friend. There's tons of help for web site development. I just recently switiched from HTML to PHP, but I recommend you use HTML until you are fully comfortable with it.