How do I make a script public in JSFiddle? - jsfiddle

If I have private scripts, in All your fiddles category how can I move these to Public fiddles category?

To make a JSFiddle script public:
Open the script.
Open the Info tab on the left.
Enter in a title for the script
Press Update.
In this new version of the script, set it as the base version.
Wait several minutes for the script to be visible in your public profile page.

Related

Safari fail to click only on the first test of the group TestNG

When I run several tests using TestNG on Safari, the first test always fails because of the click operation.
It doesn't matter what test it is as long as it has a click in it, even if I run the same exact test couple of times (using #Test(groups = {"test"}, invocationCount = 4)) only the first one can't perform a click and the others pass with no issues.
When I say click is not performed I mean the outcome of the click is not happening (for example opening a new tab or clicking on a button to change something), there is no error so the code executes the click function and move on although the click did nothing.
What could cause that difference of behavior between the first test and the tests that come after?
Here is the code of the click function:
public void clickOnWebCoords(WebDriver driver, WebElement element, Point pointToClick) {
Actions actions = new Actions(driver);
actions.moveToElement(element, pointToClick.x, pointToClick.y).perform();
actions.click().perform();
}
Safari version: 14.0.2, Selenium version: 3.141.59

Selenium IDE element not found select an option from dropdownlist

I'm new to selenium
My script is to:
open one website
click one button and then open go to another website
a drop down list will be shown in the new website, i need to select one option from the list
But I failed.
The log said:
Element id=primaryroles not found
I tried to change the target to detailed HTML element, like
//html/frameset/frame/html/body/form/table/tbody/tr/td/div[#id='clientBackground']/table/tbody/tr/td[2]/table/tbody/tr[3]/td/label/select
But it failed as well.
I think the problem may be that new website did not load fully, so i add command "waitforpagetoload" value30000 but the error is time run out
I run out of my brain, please help me :)
The weirdest thing is that i could execute this single command successfully, but i play this current test suit/case, it will fail when it come to this command.
As per the snapshot (without any visibility to your script) you have shared to select from the DropDown you have to use the following Algorithm :
Open one Website
Click one button and then open go to another website
Switch to the Frame with proper WebDriverWait
Use Select Class to identify the DropDown element.
Induce WebDriverWait for your target option to render in the HTML DOM
Click on the intended option

Are some bigquery public datasets no longer available?

When using the BigQuery GUI interface, I'm no longer able to browse the bigquery-public-data.stackoverflow dataset. It doesn't show up in the Public Datasets dropdown, where I was previously able to view the schema. On the other hand, I am able to query the table.
Have some public datasets been removed from the GUI?
The original issue was due to a bug that caused Pinned Projects to be hidden. It has since been fixed.
Regarding static_rtti's request to use the pushshift reddit dataset:
I see two ways to accomplish this:
(1) Using the original UI:
From the Cloud Console, click "Go to classic UI".
Click the little arrow next to your project name on the upper left.
"Switch to Project" > "Display Project"
Enter "pushshift" (Display Project in Navigation Panel) and submit.
You should now see a new pushshift project w/ the reddit dataset in your navigation panel.
(2) Using the new UI:
I don't see an obvious way to add a project if you aren't a member, but you can use the same trick that the public dataset browser employs. Replace YOURPROJECT with your project name in the URL below and navigate. This will pin the specified dataset for later access.
https://console.cloud.google.com/bigquery?p=pushshift&d=rt_reddit&page=dataset&project=YOURPROJECT&folder&organizationId
Hope that helps!
Use this URL in your browser:
https://console.cloud.google.com/marketplace/partners/bigquery-public-data
Then you can click on the "view all" button and look for the the ones you need.
This is the link to the bigquery-public-data.stackoverflow, click on the view dataset to use it in the WebUI.
You can review this document on accessing the public dataset.

How do I open a new private window in Selenium IDE and switch between windows?

I'm trying to make automated tests for a site, using Selenium IDE (not Selenium Server, RC, 2.0, and WebDriver).
I want to be logged in with user 1 in Firefox window 1 and open a Firefox private window to sign in with user 2. I need this because the website I want to test doesn't allow multiple users signed in in the same browser at the same time.
So:
1) Is there a way to open a private/incognito window?
2) How do I then switch back to the main window?
Here's how switching between simple windows looks like:
http://i.stack.imgur.com/P5bbt.png
In the attached image you can see how I solved the problem:
It works fine with Firefox version 42.0 (and earlier versions). With Firefox 43 I have some problems because "openWindow screen2" does not overwrite my window I open with javascript but opens an own window. I'm looking for a solution for this issue.
As far as I'm aware this isn't something that Selenium IDE can do. The best solution I can think of would be to use something like Autohotkey and combine the it with Selenium.
With AHK you can set a script to mimic the keyboard command to open a private window (ctrl+shift+p). When I've used it with selenium in the past I've set the AHK script to start when it detects a certain window title, and then had selenium call a javascript function from the user-extensions to amend the title of the page you're on to the title which will trigger the function when you need the AHK script to run. (Best not to use the default one, otherwise you could end up with countless private windows if it hits that page multiple times).
Try this,
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("browser.private.browsing.autostart",true);

Automatic screenshots with selenium

Is there anyway function that will insert a capture screenshot function after every page event, such as pageload or selecting a dropdown. currently I am using selenium html files and feeding those to selenium rc but have to manually insert screenshots after every command. and if i edit the script i have to edit the screenshots again.
Use captureEntirePageScreenshot(String fileName, "")
filName should be absolute path of file location say "C:/foo/bar.png"
Better way would be to create a base folder and generate a string everytime you have to caputre screenshot
`captureEntirePageScreenshot(rootFolder+"/"+generatedString+".png","")
this works very well in firefox 3.6
I had this problem. I couldn't find a way to do this exactly, but I got around it by spawning a new thread at the start of each test that took a screen shot every half second, and killed that thread in the teardown.